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 Antworten
2
Akzeptierte Antwort

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

beantwortet vor 4 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten
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
EXPERTE
beantwortet vor 4 Monaten
0

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

profile picture
beantwortet vor 4 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen