S3 static website hosting

0

Trying to use cloudfront and S3 to host a static website for a client and I made the permission public on the bucket, and changed properties to web hosting but still getting access errors (403 Forbidden Code: AccessDenied Message: Access Denied RequestId: AGHQ9C92J7Z3CTFX HostId: T0onj8yM+ArqrjuyqF0R/gGOanxdrrdcXr6xY8ZC+n1QeyO6/CrUaoBQ3XwmypJqO6bcV0VKlK4=)

I have another site hosted using S3 and its fine, www.truckeelabs.com

What am i missing?

2 Answers
0
Accepted Answer

You don't say which region you are using and sometimes that can make a difference in this case.

If you create a S3 bucket and an associated CloudFront distribution; then update the S3 bucket policy it can take some time for the change to be applied within S3. The exception here is in the us-east-1 region - that will generally work immediately. For other regions you may find it will take a few minutes (sometimes an hour or so) for things to work properly.

You can tell when this is the case: If you use your browser to visit the CloudFront distribution and get the 403 error, look closely at the URL. If it is a S3 URL then you're in that synchronisation period. Have patience and it will resolve itself.

profile pictureAWS
EXPERT
answered 8 months ago
profile picture
EXPERT
reviewed 18 days ago
profile picture
EXPERT
reviewed 2 months ago
  • look closely at the URL. If it is a S3 URL then you're in that synchronisation period. Which URL are you talking about here? The cloudFront URL looks like d3kdssdds71dfp0bu.cloudfront.net which has nothing to do with s3 and the customer's url has no reference to s3 whatsoever

0

Can you make sure if the bucket policy is allowing Cloudfront Origin Access Control or Origin Access identity as described in this re:Post Knowledge Center Article. You can probably compare with the one which is working fine.

I'd suggest you to go through How do I troubleshoot 403 errors from CloudFront?, this would certainly help you to get to the root cause.

Comment here about how your troubleshooting goes, happy to assist further.

Abhishek

profile pictureAWS
EXPERT
answered 8 months ago
profile pictureAWS
EXPERT
reviewed 8 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions