Amazon S3 – The Beginner’s Guide

Advertisement


Few days ago, I was still struggling with solution to further scale this blog so it will serve contents faster and at the same time, not pressuring the server too hard. Hongkiat.com serves about 50,000 pageviews daily and that consumed about 60-80Gb of bandwidths on a daily basis. Something have to be done here so the requesting of images and files will not affect the stability of the entire server. After some readings, considerations and research, I settle for Amazon S3.

You might have heard of it, or perhaps using it already. But for those who have problems scaling your site, looking for solutions or looking for a stable online file hosting, here I’ve written a fairly complete article (I hoped) that give you a basic understanding on Amazon S3, together with guides on getting and account to using it. For the ease of reading, contents are spitted up in the following sections.

  • In a Nutshell
  • Gettting an Amazon S3 Account
  • Using Amazon S3
  • Amazon S3 as Image Hosting
  • Amazon S3 Applications and Other Resources

Full guide after jump.

In a Nutshell

Amazon Simple Storage Service, also known as Amazon S3 is an online storage facility. It is cheap, fast and easy to setup. And since it’s a service provided by e-commerce giant Amazon, you can be rest-assured whatever you stored at S3 is secured. Read more about Amazon S3.

Who needs Amazon S3?

In S3, there’s no initial charges, zero setup cost. You only pay for what you utilize. It is utmost suitable for webmasters and bloggers, especially those who have the following issues:

  • Running out of bandwidths

    If you are on shared hosting account, any Stumble Upon or Digg effect can easily eat up the entire bandwidth limit for the month. Most of the time, the web host will suspend the account until you have settle the payment for the extra bandwidths consumed. Amazon S3 provides unlimited bandwidth and you’ll be served with any amount of bandwidth your site needs. Charges will be made to credit card and payment can be made at the end of the month.

  • Better scalability

    Amazon S3 using cloud hosting and image serving is relatively fast. Separating them away from normal HTTP request will definitely ease the server load and thus, guarantees better stability.

  • Paying for more that you actually used

    Whether you are on shared hosting, VPS or dedicated server, you pay a lump sum each month (or year) and the amount includes hard disk storage and bandwidth you might not fully make use of. Why pay for more when you can pay only for what you are used.

  • Store files online

    Instead of backing up your files in CD/DVDs to save more hard disk space, here’s another option. Store them online, and you have the option to keep them private or make them public accessible. It’s entire up to you.

  • Easier files retrieval and sharing

    If you store your file online, you can access them anywhere as long as there’s Internet connection. Amazon S3 also allows me to communicate files better with friends, clients, and blog readers.

Unlimited storage and bandwidths, pay as you use, full control on file privacy are what excites me towards migrating images on hongkiat.com to Amazon S3. You can probably think of more that suites your need. Read more on Why you should use Amazon S3.

Next, I’m going to explain on how you can sign up for an Amazon S3 account.

Gettting an Amazon S3 Account

Before we go into signing up an account, I think you should at least know how Amazon S3 charges. Check them out over here, or estimate with a AWS Simple Monthly Calculator. Now if you’re all set, let’s get an Amazon S3 account.

  1. Sign-up/Login to Amazon

    If you have an Amazon account, login, else sign-up for one.

  2. Get Amazon AWS Account

    Go to aws.amazon.com and sign-up a Amazon Web Services Account.

  3. Look for – Amazon Simple Storage Service (S3)

    Once you are done signing up, you’ll be greeted with a page that says your account has been created and information has been sent to your email. Look for Amazon Simple Storage Service under the list, click it.

  4. Sign up – Amazon Simple Storage Service (S3)

    Once again, you’ll be brought to Amazon S3 introduction page. Read it again if you need, or just skip to signing up an account by clicking on the Sign up For This Web Service. Put in your credit card details and follow the instruction to setup your account.

  5. Know Your Username/Password

    Once you’ve successfully sign-up, Amazon will prompt you on your AWS Access Identifiers, which includes your Access Key ID and Secret Access Key. Note that Access Key ID and Secret Access Key are as good as your username and password so you should keep them safe.

    If you have missed theAccess Key ID and Secret Access Key notification, click on Your Web Service Account, choose AWS Access Identifiers to retrieve them.

  6. Under Your Web Services Account is also where you check the account activities, how much you are going to pay at the end of the month, changing your profile etc. Getting familiar with these pages is necessary.

    Now your Amazon S3 account is created and ready to go. Let’s do some uploading.

Using Amazon S3

Your Amazon S3 account starts with a clean root account. On the root is where you create buckets. Bucket is Amazon S3’s terminology for root folder. You can create multiple buckets, and inside buckets is where you place your folders and images.

Amazon S3 releases a set of API and developers around the world releases application that allows your Amazon S3 account to talk to your local computer so you can do all the file uploading, synchronization, back-up , etc. For starters, we’ll be looking at how you can take advantage of S3Fox extension from RJonna (Firefox extension) to connect to your Amazon S3 account and later, we’ll give you a list of alternatives of free and paid applications to connect to Amazon S3.

Using Amazon S3 with Firefox S3Fox

S3Fox is a Firefox plugin, so if you don’t have a Firefox browser installed in your machine, you’ll need to get one. Install S3Fox plugin, have your Access Key ID and Secret Access Key ready, let’s get started.

  1. Launch S3 Organizer

    In Firefox, go to Tools, select S3 Organizer.

  2. Set up account

    Set up your Amazon S3 account with S3 Organizer. Enter
    a self explanatory Account Name, your Access Key and Secret Key. Click Add.

  3. Get connected, create first bucket

    Once you’ve entered the correct information, you’ll be brought to your account (which is blank, by default). On the left side of S3 Organizer will be your local machine folders, and Amazon S3 on the right.

    Right-click, Create Directory. Anything created on root level will be your buckets. All files and folders will be stored/organized under buckets.

  4. Create folders, upload images

    Double click into your bucket, create a folder. Inside the folder, upload an image. By default, anything uploaded to your Amazon S3 account will not be accessible by public.

Amazon S3 as Image Hosting

By default, images uploaded to Amazon S3 with S3 Organizers will not be made public. If you intend to share uploaded files with your friends and peers, or if you want to use Amazon S3 to host your website’s images, additional steps will be needed.

  1. Edit image permission

    Right-click on one of the image uploaded, select Edit ACL.

  2. Make public accessible

    To make your image public accessible, make sure
    Everyone, Authenticated Users and me(Owner) has read access
    .
    Follow the settings in the image below. Click on the icon to swap between ticks and crosses.

  3. Get image URL

    Right-click on any particular image, select Copy URL to Clipboard. Your URL will look something like this:
    http://hongkiat.s3.amazonaws.com/10yearsago/amazon_10ya.png

    Image URL comes in the following fixed format:
    http://bucket_name.s3.amazonaws.com/foldername/filename.jpg

Amazon S3 Applications and Other Resources

We’ve been using S3Fox throughout the entire explanation because it’s free and it resides on Firefox browser. But I thought you should also be aware of other applications and various ways out there that provide similar facilities.

Amazon S3-Supported Applications

  • JungleDisk – Reliable online storage powered by Amazon S3.

  • Transmit – FTP/SFTP application for Mac.

  • S3Sync – Consist of S3syncs and S3cmds. Ruby program that allows control of Amazon S3 account with shell commands.
  • Bucket Explorer – User Interfaces for Amazon S3.
  • Backup Manager – Command-line tool for Linux.
  • S3 Backup – Windows desktop application that makes it trivial for everyone to use Amazon’s impressive infrastructure for remote backups and secure online file storage.
  • jets3t – Toolkit for Amazon’s S3 online storage service.
  • Sync2S3 – Synchronizes your files with the Amazon (S3), providing you with a secure and affordable backup solution.
  • SME Storage – Access files from anywhere.

More Online References

Here’s more online references to help you understand Amazon S3 and its connectivity better.

Did I leave out any good resources?

Related Contents

Sponsors

Posted by hongkiat in How-To , at 09.21.08

Comments

  1. gagahput3ra September 21st, 2008

    So, are you still moving this blog to Amazon S3? Didn’t you still using Slicehost right now? :)

    Reply
  2. hongkiat September 21st, 2008

    @gagahput3ra I’m migrating the images to Amazon S3. Web hosting is still on Slicehost.

    Reply
  3. Radu September 22nd, 2008

    Nice to read about this. I am also thinking to migrate images. My question is: there is no FTP account, FTP transfer posibility? I would like to be able to move “wp-content/uploads/” structure as it is now, all in once, not file by file. Is there a solution? That Firefox plugin or the other application you wrote about can be used for this purpose?

    Reply
  4. John Burton September 22nd, 2008

    Having struggled with S3 for a while, for me you probably missed the best Amazon S3 tool – SMEStorage.com. I’m using my own Amazon S3 account via their OpenS3 program. As well as the cool web file explorer they give, I can now share my files easily, get a unique url for them, so reference them in Blogs etc, and my files are now integrated with services like Zoho and Picnik. This means if they are office documents I can edit them directly from within my Browser, and if they are pictures I can edit them directly in Picnik just by clicking a link.

    I also can use the SMEStorage iPhone web application to access my S3 files from iPhone which works for me great. Lastly I can use the Facebook add-in they provide to share my S3 files directly on Facebook.

    For me this is the best S3 service available by far……

    Reply
  5. hongkiat September 22nd, 2008

    @John Thanks for the input, I’ll be checking it out.

    Reply
  6. hongkiat September 22nd, 2008

    @Radu That is exactly what I’m doing. Migrating images from /wp-content/uploads to Amazon S3. Now you can either manually change the paths of each content (if there’s not too many) or you can do a mass find/replace in the db.

    Amazon S3 can be access via selectable FTP programs. If you are on Mac, Transmit supports Amazon S3, or try Cyberduck (free).

    Reply
  7. Jesse Andrews September 22nd, 2008

    Another S3 extension for Firefox to try out is s3:// – https://addons.mozilla.org/en-US/firefox/addon/6955

    It is designed for easy uploading and browsing directly from your URL bar – s3://bucket/key just like http://host/path

    Reply
  8. Paul Stamatiou September 22nd, 2008

    @hongkiat – I wouldn’t use S3 for hosting images on your blog unless you absolutely have a bandwidth issue. I did it for static images on my blog and realized that S3’s latency is way up there at times – around 500ms, for a single http call. Wait for the CDN Amazon just announced, well they called it “content delivery network”, which I assume is the same thing. That should have better latencies.

    Reply
  9. DjFlush September 23rd, 2008

    Wow! never knew this blog was on Slicehost because thats where my own is hosted too!

    They are the best without any doubt!

    Reply
  10. hongkiat September 23rd, 2008

    @Paul I think I have a serious bandwidth issue. Slicehost provides 800Gb by default, any Gb extra will cost 30cents/Gb if I’m not mistaken. I have a (mt) and these folks charge me $2+/gb anything over 1TB/month. Amazon S3 is only 0.13/GB and they are pretty fast!

    I thought of using flickr, but the image URL isn’t too friendly.

    Yes, CDN is what I’m exactly looking for but before Amazon release it, S3 is probably my solution for now.

    @DjFlush Slicehost is good, at lease these folks don’t oversell :-)

    Reply
  11. Dainis Graveris September 23rd, 2008

    Wow, thanks – I am sure this article took few hours to complete. This comes really in time for me – I already read Jacob Cass review about changing hosting, but You created just what I needed. I think it’s great that Amazon charges only for the traffic and GB you actually use. You persuaded me to get Amazon, instead of others.

    Reply
  12. S3 Browser For Windows October 1st, 2008

    Hi,

    thanks for the useful article!

    I’d like to recommend S3 Browser for Windows, it’s just recently released: http://s3browser.com

    You may wish to include it into your list of Amazon S3 Enabled Aplications.

    Have a nice day. :)

    Reply
  13. Calvin Fields October 8th, 2008

    John – thanks for the tip on SMEStorage – how have I ever missed this ? It has to be the best platform if you are using S3. Now that they have released a Windows File Explorer it’s prety much complete for me, especialy as it supports iPhone and lets me use my own S3 keys. Great stuff – hongkiat, your url for this site is wrong – gives me an error – the actual url is http://www.smestorage.com

    Reply
  14. emoboy October 26th, 2008

    Cheers, My pics of my new emo hairstyle
    on http://xrl.us/ouog2

    Reply
  15. seadraem November 6th, 2008

    Amazon’s S3 billing “seems” simple… but how do the PUT,GET,LIST charges get you? I may be a newbie on that front, so be kind in your answer :-)

    Reply
  16. Sohail February 3rd, 2009

    Thank you for great article mate :)

    Reply
  17. jfileupload February 11th, 2009

    You have 2 others tools in Java:
    s3 upload applet with resume, policy and MD5 support.

    And s3 explorer applet which allows to delete, upload, download, rename, copy and update ACL.

    Reply
  18. nahid March 17th, 2009

    hi.. i am using unlimited plan from bluehost.. will that be an issue? should i immeditely transfer to s3 or should i wait for the traffic spikes. Well i really need your suggestions hongkiat!

    Reply
  19. Aldian Prakoso April 3rd, 2009

    It’s nice quick start guide Hongkiat! I plan to move my videos, audios and other large files to S3 but I got confused to get started until I found your guide.

    It’s even a greater bonus since you also use Mac! Thanks for the info on CyberDuck :)

    Reply
  20. Adwords April 16th, 2009

    Perfect – this is just what I was looking for about using S3!

    Thank you.

    Reply
  21. Arthur May 2nd, 2009

    I have been using S3Toolbox

    http://www.cesaretto.it/s3toolbox

    it just works

    Reply
  22. Lewis May 9th, 2009

    How’s Amazon S3 been working out for you thus far Hongkiat?

    Reply
  23. Alex May 27th, 2009

    On Windows, Linux, and Mac, there is also another useful FTP tool CrossFTP available to manage FTP sites and S3 simultaneously. It supports multi-tabs, multi-threads, and scheduling, so that it can save you a bit of time. You can find it at http://www.crossftp.com/

    Reply
  24. reviewazon June 11th, 2009

    Thank you so much for this post. I use the reviewazon plugin. Reviewazon is the easy and simple way to add amazon affiliate product to your website.

    Reply
  25. Csaba June 12th, 2009

    Amazon S3 is a good idea hovever I think its a bit expensive for those with small budget.

    Reply
  26. faiz July 16th, 2009

    get me tips for amazon affiliates

    Reply
  27. faiz July 16th, 2009

    please give me tips for amazon affiliates

    Reply
  28. lenen July 26th, 2009

    This is great man!

    Reply
  29. marty October 18th, 2009

    Csaba said: “Amazon S3 is a good idea however I think its a bit expensive for those with small budget.”

    I have to disagree. Take a look at some streaming video hosting companies out there to get a feel for real pricing. The norm is that you would spend $80 to $500 a month. And if any serious promotion was made to, say, a 60 minute free webinar, and you had like 30 or 40 people watching the video “at the same time” you would incur even more fees for concurrent viewers.

    Those issues are what prevented video from becoming popular online for so long. But, Amazon S3 has changed all of that now. I could have 1,000 people watch the same video at the same time and there would be no limitation and I wouldn’t even come close to a $100 a month fee. And, even if I did, who cares? I mean if 1,000 people were watching my recorded webinar at the same time, I would be making a heck of a lot more than $100.

    Reply
  30. Gifts November 26th, 2009

    OH yeah ,fingting!

    Reply
  31. web analyst toronto December 7th, 2009

    Thanks for the complete guide on Amazon S3. I’ve been thinking about it for quite some time and NOW, I believe, is the time to start using it.

    Reply
  32. Peter Hollenbeck December 12th, 2009

    Excellent guide. Thanks very much.
    Peter

    Reply
  33. ルイヴィトン 財布 January 7th, 2010

    last sunday i visite this site
    http://www.brand-well.com
    i found more favorate bag here!

    Reply
  34. ヴィトン 財布 ヴェルニ January 7th, 2010

    online store selling bags!!
    http://www.brand-well.com

    Reply
  35. JoNova January 8th, 2010

    Brilliant communication in this post. Spot-on use of images and instructions. This saved me time. I appreciate the help and congratulate you on your rare ability of being able to explain software and make up for inadequacies of GUI interfaces.

    Gracias!

    Reply
  36. links london January 21st, 2010

    i cant able to access orkut in dubai
    wen visit to proxy websites the link also same as orkut kindly help me and me gud solution and send me mail plz thanks

    Read more: http://www.hongkiat.com/blog/how-to-access-blocked-web-sites/#ixzz0dE961X2u

    Reply
  37. Arifcsecu January 24th, 2010

    Please any body help me:

    I got this error many times.i don;t understand what does happend?

    Warning: S3::putObject(): [60] SSL certificate problem, verify that the CA cert is OK. Details: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed in C:\xampp\htdocs\np\S3.php on line 358
    Something went wrong while uploading your file… sorry.

    Reply
  38. Matthew Ogston January 25th, 2010

    Thanks for the great article – starting out with S3 seemed like a huge mountain to climb, but your tutorial got us up and running in about 10 minutes!

    Reply
  39. Mindy January 26th, 2010

    Just wanted to say THANK YOU for compiling this information in one place for me. The Amazon AWS site itself is so dense, it was hard to find the entry point to get started – you made it all so accessible. This is a great service you have offered us all. Thanks again.

    Reply
  40. Ken Thomas January 28th, 2010

    How bloody small is your budget? Please show me a cheaper, reliable online storage solution!

    Reply

Leave a reply