Getting Access Denied error for index.html

0

I have hosted my website example.com and www.example.com on CloudFront. The website was working fine for the past 2 weeks and all the files within S3 (PrivatePolicy, Terms and Conditions) were accessible from cloudfront. Today I ran 'Invalidation' on the cloudfront and now I am getting access denied. I am unable to access the default page, which is index.html page in s3. However, I am still able to access the PrivatePolicy, Terms and Conditions pages. I have tried disabling the distribution and re-enabling it, created new origin from scratch, checked bucket policies. When I look at the url, cloud front is appending some random words to it. Its changing www.example.com to example.com/config/?frameUrl=%2F. Also, I see the website for like 1sec and then I get access denied.

Any suggestions or guidence

3 回答
2
已接受的回答

I found the issue - the index.html file had a link that was accessing an external resource. Once I removed that link, it worked fine. Now I have to figure out how to add links to external sites like facebook

已回答 4 个月前
profile picture
专家
已审核 2 个月前
1

Hi,

You may want to read https://repost.aws/knowledge-center/s3-website-cloudfront-error-403 and check all the points that they suggest to find your problem.

Best,

Didier

profile pictureAWS
专家
已回答 4 个月前
0

did you enable website hosting on your S3 bucket for your index.html file

profile picture
已回答 4 个月前

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

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

回答问题的准则