Tutorial: Configuring a static website on Amazon S3 - Amazon Simple Storage Service
Walk through a code example of how to configure a bucket for website hosting using the Amazon S3 website endpoint.