Hosting websites – the cheapest option – Amazon S3

Every entity must have a website now! There are myriad options starting with Free. The Free ones are pretty much subdomains (sites.google.com/yourbusinessname). If you are handy and know how to create html pages, then read further. it is the cheapest option I came up with.

Create an account with Amazon AWS and sign up for S3, their cloud storage product. They charge you 10 cents a GB per month (http://aws.amazon.com/s3/pricing/) and $0.004 per 10,000 requests. The website HTML files and images altogether would be less than 1MB thus your monthly storage costs would be less than 10 cents.

Create a bucket in S3 called http://www.yourdomainname.com and copy the website files to it with appropriate folder structures. Once copied, goto the bucket properties and select “enable for static website hosting”. Next is the tricky part, you need to edit the bucket policy. I have no idea why Amazon would do this? It would have been much simpler if Amazon would have automatically created the policy once you enable the buck for static website hosting. They might point to security but this is bad user experience.

Anyway, now click on permissions and click Create bucket policy and paste the following script and remember to change it to you actual website name.

{
“Version”: “2012-10-17”,
“Statement”: [
{
“Sid”: “PublicReadForGetBucketObjects”,
“Effect”: “Allow”,
“Principal”: {
“AWS”: “*”
},
“Action”: “s3:GetObject”,
“Resource”: “arn:aws:s3:::www.yourdomainname.com/*”
}
]
}

Now goto your domain registrar (godaddy, register.com, networksolutions, 1&1…), create an alias / CNAME for “www” and point it to the S3 bucket’s public “Endpoint” under Static Website Hosting.

Once you are done with all this, create another S3 bucket called yourdomainname.com (without www) and click on static website hosting and select “Redirect all requests to another host name” and type http://www.yourdomainname.com. Now whether a user types your website name with or without www, it will load correctly.

Here is the complete instructions from Amazon. Do not follow Route53 (it is not required. if you do it will add 50 cents per month to your cost).

http://docs.aws.amazon.com/gettingstarted/latest/swh/website-hosting-intro.html

Set up http://www.baasha.net this way and the charge is only 8 cents a month.

Advertisements

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


%d bloggers like this: