Amazon S3 Hosting Static Web Sites

Amazon Web Services

Amazon Simple Storage Service is one of IaaS services provided by AWS. The main purpose of Amazon S3 is to provide storage for various online solutions running in or outside cloud. As for all AWS products also applies for S3 to pay as much as you need. It is secure, fast and scalable (at least most of the time, as we know Amazon customers had some problems with data loss).

To start using Amazon S3 storage you have to create a new bucket, which is like a new partition containing folders and files. With free tier you are limited with 5 GB of space and 20.000 GET requests and 10.000 PUT requests per month, which is enough for storing data, using it as virtual drive inside EC2 instance or hosting website.

As I created a new empty bucket, I noticed at the bottom text saying a static website could be hosted directly inside Amazon S3. After additional reading, I found this feature very useful, especially for hosting presentation web sites, with a few or none sub pages, as for more complexity, dynamic loaded content is required. To achieve HTTP server behaviour we have to mark desired bucket to accept HTTP requests.

Furthermore, administrator is allowed to define first page and error page, which came up when requested resource is not available in the bucket. Also, access policy has to be reconfigured to allow public access to the bucket. This can be achieved with setting access policy on bucket or on each file separately, e.g. html, CSS, image files. All resources are still accessible through AWS API.

To host some static content, you do not need anymore to run whole HTTP server, it is enough to have Amazon S3 service. More about Amazon S3 is available on the following links.

 

Advertisements

6 Replies to “Amazon S3 Hosting Static Web Sites”

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s