If you are hosting a popular website, you undoubtedly have to keep in mind bandwidth costs. Images, video clips, and music can take up quite a bit of bandwidth, which directly affects the bottom line. Even personal blogs, podcasts, and family websites can take a healthy amount of bandwidth. Bandwidth aside, you also have to keep in mind availability/uptime. In comes Amazon S3, which provides cheap bandwidth costs and high availability all in a professional manner.
I do not work for Amazon, nor do I get payment from Amazon in any way. However, I do appreciate when companies provide a truly great service that is an excellent fit for businesses, and can also be utilized by the hobbyist at home.
The Amazon S3 service allows you to outsource your bandwidth intensive content and connect it to something called a Cname (alias), to maintain a professional, branded look.
For example, if I own the csharprocks.com Domain and I have images and video clips that I want to provide to users of my website. I could simply host these image and video clips with my ISP (Internet Service Provider – AKA web hosting company). However, after I reach a certain bandwidth threshold, I will be charged overage fees, or even worse, I could be banned and have to find a new web hosting company. To continue with this example, I want to host my web pages (the ASP.NET, HTML, CSS, and JavaScript) on my webhost, but host my bandwidth intensive content in an Amazon S3 Bucket, which cheapens the bandwidth cost and provides the high availability. However, this leaves me with image URLs like http://storage.csharprocks.com.s3.amazon.com/logo.jpg. This doesn't look very professional and furthermore takes away from my brand. However, with Amazon S3 and my DNS provider, I can change the above link to http://storage.csharprocks.com/logo.jpg or http://images.csharprocks.com/logo.jpg, which looks much more professional and keeps my brand intact. In fact, there is no visible evidence that the image came from an Amazon S3 server at all.
Sign up for an Amazon S3 account (if you haven't already)
I am not going to go in-depth here, as the steps are simple, and I assume you are already an Amazon S3 user, and just want to attach a Cname to your S3 Bucket.
- Go to http://aws.amazon.com/s3/
- Click the Sign Up For Amazon S3 button
- Follow the remaining steps to setup an account
Create your Cname S3 Bucket
The reason that I say "Cname" S3 Bucket is because you have to name your Bucket with your desired Cname. This is very important, as this is the only way Amazon knows how to map your Domain Cname to this Bucket. Also, as a side-note, all Buckets (your Buckets, your friend's Buckets, and Buckets of other people you don't know) are all at the root level. In other words, all Buckets are unique across the Amazon S3 system. If I create a Bucket named "test" then you cannot create a Bucket named "test" because I already own that Bucket name. Ok, back to the example... If I want to have images, video clips, and other high bandwidth content look like they came from my Domain's web host (in the example above http://storage.csharprocks.com), then I need to create an S3 Bucket with that name.
You can use any S3 client of your choosing, but I prefer the S3 Organizer Firefox plug-in and will use it to describe S3 client to server interaction.
- Create an Amazon S3 Bucket with the same name as your desired Domain Cname
Attach a Domain Cname (alias) to your S3 Bucket
At this point, you have an S3 Bucket and Amazon is ready to start receiving Cname type requests. Now we need to update our DNS to allow for branded, professional looking web requests (such as http://storage.csharprocks.com/).
Your DNS provider admin screens may look a bit different then DNSExit (http://www.dnsexit.com/), but the concepts and steps should remain true to our example.
- Click on the Edit DNS link for your domain
- Click on the Add Alias link
- Type storage as the alias, choose is external host, and type the URL of the S3 Bucket you created above ({bucketname}.s3.amazonaws.com, where {bucketname} is the name of the S3 Bucket)

- Click the Add Alias button
- Finally, click the Save Change button
Add content and change ACLs
The final step is to add your high bandwidth content to your S3 Bucket and change the ACL (Access Control List) file permissions. Another side note here... When you upload your content (at least in S3 Organizer), by default the permissions are set to private. Meaning that only you, when authenticated, can request the content. You need to edit your contents ACL to allow anonymous request access.
- Upload content to the S3 Bucket you created in the above steps
- Edit the ACL of the content you just uploaded by selecting the content (unfortunately, one at a time in S3 Organizer) to have it publicly accessible by right clicking on it and choosing Edit ACL from the context menu

- You should be prompted with an Edit ACL dialog box. Check-mark the Read access for Everyone and click the Ok button. At this point, the content you selected should be accessible to the public, as well as available using your new Cname (alias).

Good luck and let me know how this worked out for you. I am interested to hear if you or your company is capitalizing on this great service, and of any pitfalls you may have experienced.
-Jessy Houle