Amazon S3 (Simple Storage Service) is an online storage service that can be used to host static contents, like image files, instead of hosting them yourself. One of the biggest advantage of S3, is the reliability you get from Amazon servers during high traffic and their bandwidth and storage prices are low compare to other similar services. We will give you a walk through of how to integrate and configure Amazon S3 with your wordpress to host images.
Step 1) Create an Account: Having an S3 account will help :). You should know that if you already have an account with Amazon you can use it to sign up for S3. You will need Credit card or a Bank Account to sign up. Unfortunately they don’t accept PayPal. After you register your account and verify your email, you will need to create a “Secret Access Key”. Its important that you do not share your “Access Key ID” and “Secret Access Key” with anyone under any circumstances. Others can use this information to store files in you S3 account without your knowledge and cost you unwanted bills from your account.

Step 2) Create a Bucket: Amazon S3 uses “bucket” to work as folders. You need to create a bucket with a unique name. I use Firefox add-on S3Fox to access, edit and manage my buckets. You will need to edit your bucket’s ACL to let everyone have read access so that they can view static files (like images) that you will be hosting at S3.

Step 3) Create a CNAME: You should create (though not necessary) a CNAME to link your S3 bucket to a better looking subdomain instead of the usual “foo.mydomain.com.s3.amazonaws.com”, you might want to make it look like “foo.mydomain.com” (the name of the bucket). I am using Slicehost, so this is how I created a CNAME from slicemanager:
Type: CNAME
Name: foo
Data: foo.mydomain.com.s3.amazonaws.com. (yes there is a dot at the end)
Step 4) Install Amazon S3 Wordpress Plugin: Amazon S3 Plugin for WordPress seamlessly integrates amazon S3 to your wordpress blog, so when you upload an image using your built in wordpress editor, it also uploads a copy to your S3 account. This plugin configuration is self-explanatory, you will need your “Access Key ID”, “Secret Access Key” and the bucket you want to use to store images.
Conclusion: Amazon S3 is a powerful storage service and this is just a small example of what you can do with it. It is important to have proper safeguards and stop direct hotlinking to static files using htaccess.
Filed under: Web Design & Internet
Follow us on twitter
Comments:
-
Blog Host
06/24/2009hello, I like the design of your blog. What’s the theme you’re using or is it custom design? thanks.
-
rosie
10/11/2009Thanks for this post. What are your suggestions for safeguarding against hotlinking?
-
Wigan web design
11/20/2009Thanks for putting together an easy to understand guide to s3. I wanted to know whether I could use s3 as a web host… and spent way to much time reading vague blog posts that were more concerned with impressing than informing.
Your post is concise, very well written and put together – and your extra effort creating and adding the images really helps.
Finally I know what s3 actually is :)
Thanks and good luck with your blog.
Jose Gonzalez


05/18/2009
S3 is awesome for hosting static files, but if you site or online business grows to a level that you are serving millions of viewers a day than it become rather very expensive. Its host them at your own server.
S3 makes sense for large sites when they are growing bigger than their ability to deploy servers.