Host Your Static Website At Amazon S3

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:

http://web.highedwebtech.com/pages/index.html

If you tried to enter just:

http://web.highedwebtech.com/pages

The user would get an error message that isn’t very user friendly:

Screen shot 2011 02 18 at 1

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:

Controlpanel

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.

2 thoughts on “Host Your Static Website At Amazon S3”

  1. AWS CloudFormation is a template driven resource assembly service with sample templates for open source apps like WordPress (blog), Tracks (project tracking), Gollum (wiki). Looks like this should allow smaller operations without a dedicated webmaster to make better use of the cloud.

Comments are closed.