Is there a way to have index.html functionality with content hosted on S3?

amazon-s3, amazon-web-services

Solution

Amazon S3 now supports Index Documents

The index document for a bucket can be set to something like `index.html`. When accessing the root of the site or a sub-directory containing a document of that name that document is returned.

It is extremely easy to do using the aws cli:

aws s3 website $MY_BUCKET_NAME --index-document index.html

You can set the index document from the AWS Management Console:

Problem

Is there a way to make S3 default to an index.html page? E.g.: My bucket object listing: ``` /index.html /favicon.ico /images/logo.gif ``` A call to www.example.com/index.html works great! But if one were to call www.example.com/ we'd either get a 403 or a REST object listing XML document depending on how bucket-level ACL was configured. So, the question: Is there a way to have index.html functionality with content hosted on S3?

Original source

Related problems