Sometimes it’s useful to have a index listing on a AWS S3 bucket. Here are some solutions to configure it with nice template. If having a public index list on a S3 Bucket is a good idea or not I’m not saying yay or nay.
First set the correct Bucket Policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": "s3:GetObject",
"Resource": "arn:aws:s3:::tmfg-tiesaahistoria/*"
}
]
}
Next set Permissions
Everyone, List objects Yes
Create a index.html
For the index.html you have couple of choices:
- Use the index.hml with modifications by Nolan Lawson (see also: Lawson’s blog post and code)
- Use more up to date forked index.html
- Use original file by Francesco Pasqualini
- Use AWS S3 Bucket Browser
To use it, just upload the index.html
file into the root of your public S3 bucket.
That’s it!
Leave a Reply