Home > Technical & Creative Skills > Programming, Servers & Scripts

AWS "Access Denied" Serving Index.HTML (4)


03-23-2021 03:44 AM #1 jeremie (Moderator)

This error is not linked to a DNS problem. It is a permission problem.

Please post the link you are trying to access to, which results in that error, so that we can check.

Either:
- you did not give CloudFront the permissions to access S3 files
- you are trying to access www.site.com/mylander/ instead of www.site.com/mylander/index.html


03-24-2021 04:51 PM #2 jeremie (Moderator)

I need to see screenshots of Cloudfront's sections "origins" and "behaviors" parameters, as well as S3 section "Permissions".


03-24-2021 06:45 PM #3 jeremie (Moderator)

Hey

1) First problem is with the capitals in S3. Filenames on S3 are case sensitive.
I recommend to avoid caps, spaces, special chars in URL

This does not work:

Code:
https://thailandlandingpag1.s3.amazonaws.com/sweeps/iphone11/th/lp1/index.html
This works:
Code:
https://thailandlandingpag1.s3.amazonaws.com/Sweeps/iphone11/TH/LP1/index.html
----------

2) Second problem is that your S3 policy contains a Condition that you somehow added, which is not it the tutorial.
Remove what's inside the rectangle



OR:


a) In S3, go on Bucket Policy, then click Delete

b) In CloudFront:
- go in Origins, select the default one, click edit
- select "Yes" in "Restrict Bucket Access"
- select "Create a New Identity" in "Origin Access Identity"
- select "Yes, Update Bucket Policy" in "Grant Read Permissions on Bucket"
- validate changes

Wait for cloudfront to redeploy the distribution and test again



----------

You may have a third problem of configuration in Route 53. Make sure to follow carefully step "4) SET UP DNS on ROUTE 53" of @vortex tutorial. If it is still not working, please post your Route 53 screenshots


03-25-2021 01:42 AM #4 lilgator (Member)

@jeremie

I deleted everything and started from square 1 and IT WORKS!


Home > Technical & Creative Skills > Programming, Servers & Scripts