After creating the distribution network when I am going to access through the Domain name URL, it's showing the error '#AccessDenied'' (Screenshot is attached).

1 year ago 21 Replies
SB
Sushant Bhatia
3 years ago

Need help to resolve the #issue. I have created a #CloudFront distribution network and the Origin is an #S3bucket (Bucket & Files are with full public access). After creating the distribution network when I am going to access through the Domain name URL, it's showing the error '#AccessDenied'' (Screenshot is attached). #awscloud #CloudFront #help

10 Likes

Replies

Agron Demiraj 3 years ago

Bucket permissions. Check the Access for CDN you have created. Try to access the files with S3 URL first, if this works then CDN domain should work also

0 Likes
Sushant Bhatia (3 years ago)

I have checked...I am able to access the file with S3 URL but not with CDN domain.

Agron Demiraj (3 years ago)

Sushant Bhatia Allow Cloudfront to access S3 by applying permissions on S3 Bucket.

Deepinder Singh 3 years ago

Could be DNS related, give it a few hours to update the DNS records. You can validate that by making a test file in S3 public and then try accessing it through CDN URL

1 Like
Sushant Bhatia (3 years ago)

It's already has been 2 hours...also CDN is in enable state.

Deepinder Singh (3 years ago)

Sushant Bhatia are you able to access any file set as public?Also, validate OAI access policy under bucket policy.

Owais Ahmed 3 years ago

It is clearly a permission issue. Either you grant public read access or use role to grant permission

1 Like
Sushant Bhatia (3 years ago)

I have already on the public access of S3 bucket & file into the bucket.

Owais Ahmed (3 years ago)

Sushant Bhatia is there any acl permission on file

Sushant Bhatia (3 years ago)

Owais Ahmed no

Teja Swaroop Mylavarapu 3 years ago

Simple... You need to go to the S3 bucket policies and mention it to allow access to CloudFront. Till you do that CF can't access your bucket.... And in CF you need to give S3 as origin... It's called OAI... Read OAI and S3 bucket policies and you are gold

1 Like
Siyaram Kumar 3 years ago

Do it make public

0 Likes
Linh Hồng Trương 3 years ago

Could you share your S3 bucket Policy settings? So anyone can have a look and help you sort it out.

0 Likes
Ajit Kulkarni 3 years ago

Never give public read access to you S3 bucket

1 Like
Ritwik Raman 3 years ago

Been long now u should be able to access the S3 content without changing any bucket policy

0 Likes
Sachin Meshram 3 years ago

It seems your origins configuration is not correct. Make sure you are pointing to index.html in correct path

0 Likes
Charan Lokesh (3 years ago)

Sachin Meshram I think the issue is with this He is CRT Try this

Faraz Munir Khan 3 years ago

cloud front is not able to access the s3 bucket contents you need to check bucket policy allows your CDN to access this bucket .

1 Like
Relate Discussions