Select index object in AWS S3

Asked

Viewed 24 times

0

I don’t know how to allow access to the index.html file without specifying it: see:

inserir a descrição da imagem aqui

If I do not include the name of the index.html file shows error measurement. How can I free access to the folder that has index.html files?

1 answer

0

You are probably using the Bucket address, not the Static website. In Bucket, if Voce makes a get request without specifying the key, it understands it as a listing, which should not be allowed. When creating the Static website you can specify the index file (index.html) and get a different address (http://examplebucket.s3-website-us-west-2.amazonaws.com), either responds in the desired manner.

More details in the documentation on https://docs.aws.amazon.com/pt_br/AmazonS3/latest/dev/WebsiteHosting.html

  • 1

    I left to say I’m using Cloudfront + S3 (I did a test on another Bucket without Cloudfront and gave the same error). I found a solution through the Lambda. I have not posted yet because it is very extensive.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.