Close
Close

Want a Crash-Proof Site? A Paint-by-Numbers Guide to Using (and Surviving) Amazon S3

By Mary Jaksch from GoodlifeZen.

Do you dream of creating a post or Ebook that goes viral? If you do, you might run into a problem. People flock to your site. You’re ecstatic about the spike in your visitor numbers. And then your site crashes.

The problem is that your site can buckle or crash under the strain of using too much bandwidth. So in order to safeguard your site, it’s important to use as little bandwidth as possible. But how can you do that if you want to use images, audio, or even video on your site? Luckily, there is a nifty solution. And it’s dirt cheap!

The solution is Amazon S3.

What is Amazon S3? I’m not a geek, so I’ll give a simple explanation:

Imagine for a moment that you’ve got a storage problem in your home. One way to deal with this, is to rent space in a storage facility. This is exactly what Amazon S3 is: it’s an online storage facility.

You know Amazon.com, right? That’s the big online store that sells books and other stuff. I’m sure you can imagine that they have a huge server capacity because they’ve got so much stuff on their site. Amazon S3 is a system that rents out some of their spare capacity. For cents, not dollars.

Advantages

  • Amazon S3 is super cheap.
    There are no setup fees or minimum costs. You only pay for what you use, even if it’s just a couple of cents a month. We are literally talking cents, not dollars here!
  • It works.
    All your images look just like usual and you can control the size and placement just as before.
  • It’s easy to use – eventually.
    With the help of WordPress plugin Amazon S3, you can upload images through Amazon S3 automatically. If you’re not on WordPress, or if you’re uploading videos or audio, you can upload manually.

Disadvantages

  • The setup is complex and glitch-rich.
    Setting up on Amazon S3, the Firefox S3 Organizer, and the WP Amazon S3 takes time and can be frustrating.
  • Amazon S3 only works with Firefox.
    In order to upload manually, you need to use the (free) Firefox extension S3Fox Organizer
  • There are plenty of pitfalls.
    Uploading manually with Firefox S3 Organizer is fraught with possible errors. (People have been known to punch their computer in frustration!)

Set up Amazon S3 in three (reasonably easy) steps

Step #1: Set up your account on Amazon S3
Go to the home of Amazon S3 and set up your account. This video will help you. Just follow the steps.

Step #2: Install and set up the Firefox extension Amazon S3
Go to s3fox.net to install the Firefox Extension. Once you have installed it, you can access it by clicking on ‘Tools’ on the Firefox navigation bar. Once you’ve installed the extension, set up at least one ‘bucket’. (This is what storage folders are called.)

Take a look at the video I suggested above. In the second half it tells you how to upload files, using the Firefox S3 Organizer. Make sure you take note of how to set ACL permissions.These permissions say whether only you can read the file you’ve uploaded, or whether it will be available to the general public.

The way to change the ACL permissions is to highlight a file you’ve uploaded, then click on the pencil icon in the bar above it. Make sure the file has three green ticks, i.e., set it to ‘read’ for everyone.

Step #3: Set up WordPress plugin Amazon S3
There is a nifty WordPress plugin called Amazon S3. Download the plugin and unzip the file. To install it, use an FTP client (that’s software to get stuff onto your site), and upload the unzipped file into your Plugin folder. Then go to your WordPress Dashboard and click on Plugins.

Activate the plugin. It will ask you for the “AWS Access ID” and your Secret Key. If you’re not sure what they are, have another look at the video above. It’s explained how to find them. Once you’ve inserted your ID and Secret Key, the plugin is ready to roll.

Pitfalls nobody tells you about.

  • Pitfall #1 You haven’t set up a ‘bucket’
    If you have more than one website, chose one bucket per website. (A bucket is like a storage room for files). You could also have a bucket each for images, audio files, PDF’s and so on. Setting up a bucket is an essential part of the process if you want to use the WP Amazon S3 plugin. The plugin won’t work without at least one bucket!
  • Pitfall #2 You cant find the correct upload URL
    In order to put the stuff on your website, you need to know what the correct address is. Unfortunately, the S3 Organizer fails to point out this small but crucial detail! Here is an example from my GoodlifeZEN website: http://goodlifezen.s3.amazonaws.com/welcome-GLZ-5.flv -it’s the actual address of my ‘welcome’ video.
    The ‘bucket’ or S3 folder I’ve set up is called goodlifezen, and the file name is welcome-GLZ-5.flv. When formatting the file address, use your bucket name, then s3.amazonaws.com/ followed by the file name.
  • Pitfall #3 You just can’t get the darn thing to work.
    You’ve done everything right, but when you click on the link, you get error message or the plugin refuses to work. Frustrating! Take a deeeep breath and don’t throw your toys out of the cot just yet. Consult the following troubleshooting section first.

Troubleshooting

  • Problem: You’ve installed the S3 Plugin and it comes up with an error message – even though you’ve put in your ID and Secret Key correctly.
    Solution: Did you cut and past the keys? If so, try to type in the ID and key number.
  • Problem: You’ve managed to install everything correctly but when you try to access the file on the Net, you get the message ‘Access Denied’.
    Solution: Check the ‘read’ permissions and make sure you have three green ticks.
    (See above to read about ACL permissions).
  • Problem: You’ve set permissions correctly, but still get the ‘Access Denied’ message.
    Solution: Check whether the file you’re trying to upload is located in a folder. If so, change the address to include the folder. Here’s an example: Let’s pretend that the file I mentioned above was uploaded within a folder called video. The correct address for the file would then be: http://goodlifezen.s3.amazonaws.com/video/welcome-GLZ-5.flv. As you can see, the folder name is now included in the pathway to the file.
  • Problem: You try to access the uploaded file but get an error message, saying: ‘File not found’. This can mean that the the link address isn’t configured correctly.
    Solution: Check and correct the link address. The quickest way to check is to put the address in your browser window.
  • Problem: You’ve configured everything correctly, and you still get ‘Access denied’ message and are just about to throw your computer out of the window.
    Solution: Go back to the Firefox S3 Organizer and check that the filename you chose is in lower case. If not, rename the file and upload it again.
  • Problem: Your S3 plugin isn’t working. Solution: check whether your site running on PHP 5. (This is the scripting language your site is using). Ask your hosting company what PHP your site is running on and how to change it. It’s usually just a one-click change. This plugin will only run on PHP 5.
  • Problem: Your S3 plugin still isn’t working.
    Solution: Make sure you’ve created a bucket in your Firefox S3 Organizer. The plugin won’t work without creating a bucket first.
  • Problem: You’ve tried it all but it still doesn’t work.
    Solution: Shoot your computer, forget about Amazon S3, or leave a rude comment.

You’ve set up Amazon S3. Now what?

If you are not a WordPress user:
You can manually upload any file through the Firefox S3 Organizer. Then link to the uploaded file using the address formatted as explained above.

WordPress users:
Once you’ve installed the plugin, everything is automatic – at least where images are concerned. Upload your images as usual and the plugin will automatically upload the image to your Amazon S3 bucket and create a link to it. It’s easy! You can also upload PDF or other text files with ease.

Audio and video
Putting up audios is relatively easy. I use a WP plugin called Audio Player for the podcasts. I manually upload the audio files through the Firefox S3 Organizer and then link to them on site, using the correct plugin configuration.

Putting videos on your site is more complex. I use a JV FLV Player and upload with Amazon S3.

Conclusion

Setting up Amazon S3 is complex but not difficult. Allow about 20 minutes to get everything set up. Once you’ve got it set up, you will love it! You won’t have any more problems with bandwidth and you can store your files there for mere cents.

I’d like to acknowledge Dave Kaminski of the Video University Blog. Without his ever-patient support I would never have overcome all the obstacles to using Amazon S3.

You can read more by Mary Jaksch on her blog GoodlifeZen or on Write to Done where she is the Editor. Join Mary on Twitter.

About Darren Rowse

Darren Rowse is the founder and editor of ProBlogger Blog Tips and Digital Photography School. Learn more about him here and connect with him on Twitter, Facebook, Google+ and LinkedIn.

Problogger.net runs on the Genesis Framework

Genesis Framework

The Genesis Framework empowers you to quickly and easily build incredible websites with WordPress. Genesis provides the secure and search-engine-optimized foundation that takes WordPress to places you never thought it could go.

Check out the incredible features and the selection of designs. It's that simple - start using Genesis now!

Comments

  1. furniture says:

    Amazon S3 has been a great help for me for years.

  2. moonwalker says:

    Its a great info,thank’s darren

  3. I would like to mention that Forklift, a Mac finder-replacement and FTP/SFTP client does integrate quite well with Amazon S3.

  4. penny stock says:

    Blogroll links aint that great :P but i am not the admin… :P … Just Telling :P :D

  5. work at home says:

    Very cool! Glad I found this post. I wanted to say hello and thanks for posting such good stuff. – Jon

  6. rosie says:

    Wow, this is just what the doctor ordered. It was clear, concise and creatively funny.
    I followed the steps and was successful. However, I think the it important to let new bloggers know that they need to imput the codes via the settings in WordPress.
    I like the player you suggested and whereas it will work for my non-profits I am looking for a lower cost solution. There simply must be a non-pretty tech script out there somewhere.
    I am also getting an education in the comments. Thanks, this is blogging at it’s finest!

  7. I just wanted tot thank you for this post.
    I was just about to shoot my computer.
    The troubleshooting section help me
    change my mind of publicly executing
    my Dell.

  8. Wow, Mary. You taught me something new today. Thanks! I love learning. :-D

    I’ll definitely keep this as a reference should I decide to use Amazon S3 in the future.

  9. I will admit I haven’t read all of the comments above so this may have been mentioned:

    S3 is not a CDN to whoever mentioned that in a comment. Amazon S3 with CloudFront enabled (a custom bucket configuration) is a CDN. That being said, regular S3 isn’t the solution to everything and will introduce some nice latency.

    If you want a quick how-to on setting up S3 with CloudFront, I wrote a detailed post: http://paulstamatiou.com/how-to-getting-started-with-amazon-cloudfront

    As for “Amazon S3 only works with Firefox.” – while s3fox may be crazy popular there are tons of S3 compatible programs – like Transmit on the Mac, or CloudBerry Explorer on Windows.

  10. Sanix says:

    I’m using Rackspace cloud instead of Amazon S3. Rackspace cloud sites and cloud files can be combined together to make a very powerful website solution. Rackspace also charges per usage. I don’t know whether they are more expensive than Amazon S3 or not but I’m happy with them :-)

  11. The Chinese use two brush strokes to write the word ‘crisis.’ One brush stroke stands for danger; the other for opportunity. In a crisis, be aware of the danger – but recognize the opportunity.

  12. Tina Johnson says:

    Nothing but great info here. Thanks.

  13. Scott Reyna says:

    Wow, this is great stuff and I’m glad I ran across your blog. Keep it coming!

  14. umar says:

    Does this account free

  15. 1st time get to know these things thanks for to share this article its really helpful.I am looking for the next one from you and even bookmark this page