Amazon S3 Storage Now Handles Entire Websites
Cheap, cloud-hosted web servers are a key component of a distributed web. But sometimes you don’t need a server, you just need a cheap way to host your static files, like images and videos. That’s the gap Amazon’s S3 service has long filled — offering a simple and cheap way to serve up static files without paying for an always-on server.
Now, thanks to an update, you can host not just a few image files, but a complete static website on Amazon S3.
Previously, S3 wouldn’t work for an entire site because the root level of your Amazon S3 “bucket” (as storage containers are called in Amazon parlance) was an XML file. For entire websites you needed to use Amazon EC2, even if your site was purely static content.
But Amazon has changed the way S3 works. Now, an S3 bucket can be accessed as a website, making it possible to host static sites on the service. If an error occurs, your visitors will see an normal HTML error document instead of the old XML error message.
Amazon CTO Werner Vogels is eating his own dog food and has a helpful post on how he moved his blog to S3. Like most blogs, Vogels’ site is mainly static content, so serving it from S3 is simply a matter of uploading the files and changing the CNAME to point to the S3 bucket instance. Of course, for those elements of the site that aren’t static — editing posts, managing comments and searching — Vogels still relies on a web server.
For those using static publishing systems like Jekyll, the revamped S3 makes a cheap hosting option.
Amazon S3 still has some notable oversights — like the lack of support for gzip/deflate — but now that it can handle whole static websites there’s no need to pay for a server when you don’t need one.