Prettifying AWS S3 Bucket public index list

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:

  1. Use the index.hml with modifications by Nolan Lawson (see also: Lawson’s blog post and code)
  2. Use more up to date forked index.html
  3. Use original file by Francesco Pasqualini
  4. 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!


Posted

in

,

by

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *