Using Amazon S3 To Host Your Media Files.

Posted in Hosting, WebMaster by DB

Amazon Simple Storage Service or S3 as it is more popularly known is an extremely cost effective way to store and manage your data. Your data could be anything, from simple normal every day work related files to your hosting or database backups. The only limitation Amazon S3 has is that the file size should not exceed 5 GB.

I recently wrote a post on website hosting on how important data backups are and today I wanted to talk about Amazon S3 and how to start using Amazon S3. From a hosting or a webmasters perspective, one of the better uses of Amazon S3 is to use it effectively to offload all your resource hogging files such as your video, mp3 and image files from your current shared or dedicated hosting servers onto Amazon S3.  This short tutorial will show you how to do just that.

First step is to obviously sign up for Amazon S3. After you sign up you will have access to your accounts key two access identifiers.

  1. Access Key ID
  2. Secret Access Key 

To keep this simple, I’m going to suggest we use freely available tools to upload our data to our S3 account. The one I use regularly is ”Cockpit”. Cockpit is a stand alone application built using JetS3t, a free open source java toolkit and application suite for Amazon S3. But for the purposes of this demo I’m going to use a really cool Firefox plugin for S3.

Once you’ve installed your Firefox plugin you are now good to go. Open up the plugin and click on Manage Accounts on the top left.

Amazon S3Fox

This will bring up a  popup where you need to enter your Access Key and Secret Key. Think of the Access Key and the Secret Key as your Username and Password. Once logged in, the plugin will open up three split panes which is really self explanatory. The right side pane is your S3 account area.

Before you begin to transfer your data files you will first have to create a “Bucket”. Think of a bucket as a folder, a way to group like files together. Simply right click and say “Create new Directory” and a new bucket is created. Internally however, a bucket is a sub domain within Amazon S3. For this reason you will sometimes find that you cannot create a bucket with a name of your choice because that particular name already exists and always use small case when you name your bucket.

Navigate to the newly created bucket. Select the files you want to be copied from the left pane and click on upload. You can track the progress at the bottom. It’s really no different to using any FTP program. Change the file permissions to allow read for everyone if you would like to access the file from an external system such as your web page.

Amazon S3 ACL

All you need now is the url to the file. Right click on the file and select “Copy URL to Clipboard”.

Amazon S3 URL

This will give you the url to use from your html page. The syntax for the url will be ”http://<bucket-name>.s3.amazonaws.com/<file-name>”

That’s all there is to it folks. Now you can offload your media files onto S3 and save a ton on bandwidth charges. Do keep coming back for more tips on website hosting and make sure you subscribe to this feed. 

Page copy protected against web site content infringement by Copyscape

Leave a Comment