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 Answers
2
Accepted Answer

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

answered 3 months ago
profile picture
EXPERT
reviewed 24 days ago
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
EXPERT
answered 3 months ago
0

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

profile picture
answered 3 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