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 个月前352 查看次数
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 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则