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 個月前

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

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

回答問題指南