I upload my html code to S3 and enable the static website option. It works fine only for /index.html
If I navigate to an html file like products/index.html it works fine, but when I navigate to the folder like products/ it fails with AccessDenied.
What is the problem? It should recognise the index.html from inside the folder
{
"Version": "2012-10-17",
"Id": "__POLICYID__",
"Statement": [
{
"Sid": "__SSID__",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::__MYDOMAIN__/*"
}
]
}
Finally this the solution is a lambda@edge thath replace any path finished with / for path/index.html