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?

已提問 8 個月前檢視次數 353 次
2 個答案
0
已接受的答案

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
專家
已回答 8 個月前
profile picture
專家
已審閱 5 天前
profile picture
專家
已審閱 1 個月前
  • 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
專家
已回答 8 個月前
profile pictureAWS
專家
已審閱 8 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南