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 Risposte
2
Risposta accettata

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

con risposta 4 mesi fa
profile picture
ESPERTO
verificato 2 mesi fa
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
ESPERTO
con risposta 4 mesi fa
0

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

profile picture
con risposta 4 mesi fa

Accesso non effettuato. Accedi per postare una risposta.

Una buona risposta soddisfa chiaramente la domanda, fornisce un feedback costruttivo e incoraggia la crescita professionale del richiedente.

Linee guida per rispondere alle domande