It’s interesting to watch Amazon S3 shift and morph into a system that offers all sorts of different types of functionality. I use it for serving videos, images, PDFs as well as backing up content, WordPress databases and other video work I do.
I also host some small websites there. Technically, you could always host static HTML web pages at Amazon, but you were pretty limited in your options. The pages had to be static HTML (no PHP, ASP, etc) and could only be accessed with the direct full URL. For example:
If you tried to enter just:
The user would get an error message that isn’t very user friendly:
A few months ago, Amazon added a feature for hosting sites that would let users see a list of files in a directory, but if something went wrong, you’d still get that nasty error message.
Just this week, Amazon has released the ability for you to define both an index file for your S3 hosted site as well as an error document.
It looks like this:
That makes it much easier to fully host a site at S3. Why would you want to host your site at S3?
For one, you can leverage Amazon’s cheap bandwidth and built-in scalability. If you’re launching a project on your campus, or doing a large scale outreach project for prospective students or alumni, there can often be a large spike of users, especially if there’s a big marketing push. By having the site living at Amazon, you wouldn’t have to worry about Amazon being able to handle the load.
The downside of this type of service is that it just accepts static HTML files. If I upload a PHP document (index.php for example) it just downloads the file, it doesn’t display in the browser. That means if you’re using any type of CMS, you can’t host your site in S3, you’d have to build a server in EC2.
But, it sure would be nice if you could export static files, such as what WP-Super-Cache creates out of a system like WordPress and serve them from S3. That’d be super fast, for reals.