Amazon S3 updates improve website hosting

amazonservers

Amazon has always been a respected name for innovation and now they have moved further to consolidate their webside presence by allowing you to host your static web site on its S3 platform. If in the past you hosted your graphics, videos etc on Amazon S3 you could not run your entire web site.

Why? If a user enters a site address (www.example.com) and the CNAME in the site’s DNS record resolves to the root of an S3 bucket (www.example.com.s3.amazonaws.com), Amazon S3 would list the contents of the bucket in XML form. In order to work around this, customers would host their home page on an Amazon EC2 instance. This is no longer necessary.

The Amazon blog reports:

You can now configure and access any of your S3 buckets as a “website.” When a request is made to the root of your bucket configured as a website, Amazon S3 returns a root document. Not only that, if an error occurs your users receive an HTML error document instead of an XML error message. You can also provide your own error documents for use when a 4xx-class error occurs.

Here’s more detail on the new features:

Website Endpoints

To access this website functionality, Amazon S3 exposes a new website endpoint for each region (US Standard, US West, EU, or Asia Pacific). For example, s3-website-ap-southeast-1.amazonaws.com is the endpoint for the Asia Pacific Region. Existing buckets and endpoints continue to work the same way they always have.

Root and Index Documents

When you configure your bucket as a website, you can specify the index document you want returned for requests made to the root of your website or for any subdirectory. For example, a GET request made to the following URI (either direct or via a CNAME):

mywebsitedomain.s3-website-us-east-1.amazonaws.com/images/subdirectory/

Will return the following S3 object

mywebsitedomain.s3.amazonaws.com/images/subdirectory/index.html

Error Document

When you access a website-configured bucket through the new website endpoint, and an error occurs, Amazon S3 now returns a new HTML error page instead of the current XML error. Also, you can now specify your own custom error page when a 4XX error occurs.

You can use the S3 tab of the AWS Management Console to enable your bucket as a website.

SHARETweet about this on TwitterShare on LinkedInShare on FacebookShare on Google+Pin on PinterestDigg thisShare on RedditShare on TumblrShare on StumbleUponEmail this to someone

Kevin Tea is a journalist and marketing communications professional who has worked for some of the leading blue chip companies in the UK and Europe. In the 1990s he became interested in how emerging Internet-based technologies could change the way that people worked and became an administrator on the Telework Europa Forum on CompuServe. With other colleagues he took part in a four year European Commission sponsored project to look at the way that the Internet could benefit remote communities. His blog is a resource for SMEs who want to use cloud computing and Web 2.0 technologies.