Host website in S3


Yes, its now possible to host your entire website in S3. The only requirement is that the site should contains only static files, ie only html support at the moment.

Earlier if you were browsing the bucket, the directory is listed. For example, lets assume a bucket named www.nixhat.com. When you browse using any web browser, it will display all the files even if the root contains an index.html. Now the S3 has changed. If you have an index.html, it will display the webpage.

How to configure ?

Create a bucket and select its properties from AWS web interface. Now you could see an option named “website”.

Select “Enabled”.

Enter the document root file name in the field "Index Document". You can enter index.html or any other file as document root.

Enter the file name for displaying error pages in the field "Error Document".

You can see a term named “Endpoint” which gives you a URL. Its the cname you could use and has to update DNS records with it.

In our case the URL is http://www.nixhat.com.s3-website-us-east-1.amazonaws.com/

So the CNAME is www.nixhat.com.s3-website-us-east-1.amazonaws.com

In DNS record update the CNAME record of www with www.nixhat.com.s3-website-us-east-1.amazonaws.com

One of the disadvantage is that you can use only cnames. ie if you want to host your site as nixhat.com, its not possible as most of the DNS providers doesn't support adding a cname for root domain, you can add only “A” record. If your DNS provider support domain forwarding, then you could easily implement S3 for hosting your static website for your domain name.

Is hosting in S3 is cost saving to you ? Depends on the traffic you gets. I recommend only for sites which expects very low traffic.

The S3 website service is launched only yesterday and we could watch for more reviews soon.