Easy, Cheap, Reliable – Amazon S3 and Amazon CloudFront

Amazon CloudFront

Trust Your Content to the Cloud

If you do anything on the web, sooner or later you are going to need a place to store files.

You may want to host photos for your eBay auctions without having to worry that the service you use will suddenly go out of business or raise prices. Or you may want to add video to a blog or web site without paying the overhead for streaming. Maybe your photo blog was frontpaged on Digg, and you are suddenly over your bandwidth limit.

Or maybe you just want to know you can grow without paying now for bandwidth you’ll need in the future.


With Amazon S3, you not only get unlimited storage and bandwidth – you only pay for what you use.

And it gets better still …

Until June, 2010, S3 is offering free data transfers in (i.e., uploads) up to 50 Terabytes. If you are just getting started, it will cost you nothing to add all you files, no matter how many or how large, to your S3 bucket (until you cross the 50 TB line).

Actual data transfer is charged at $0.15 per GB for the first 50 TB (it goes down from there). That equals 100 GB of bandwidth for $15.00 – with no overage charges, no server throttling, no demands that you move from shared to dedicated hosting.

And of course, you only pay for what you use. If you use 10 GB, you pay $1.50.

I don’t think there’s a better deal.

Pair Amazon S3 with Amazon CloudFront, and you have incredibly fast, distributed content for pennies.


What’s Distributed Content?

Instead of downloading directly from your S3 Bucket (whatever the physical location of its server) Amazon CloudFront calls the original content in your Amazon S3 bucket. CloudFront is a global network of what Amazon calls “Edge Servers.” When someone clicks on the link for one of your videos or a web page with your photos is loaded by someone’s browser, the Edge Server closest to the end user serves the content.

The result? Faster performance.

That’s pretty cool (although maybe not worth the added cost for small users), but what is truly amazing is the new streaming servers that have been added to CloudFront. These servers work with the RTMP protocol, offering  streaming video at a fraction of the usual cost and with no need for complicated set ups.


Most web video, especially on blogs and non-commercial web sites, is a type called “Progressive Download.” Before the video starts to play, a predetermined percentage of the video is downloaded to the user’s computer. As the video continues to play, more is downloaded.

If the download cannot keep up with the viewing, the user experiences “buffering.” The video pauses while it waits for more data to be transferred. The bottleneck can be on the viewer’s computer or on the web server, but the effect is the same: viewer frustration. In fact, one study suggests that 81% of viewers click away if a video stops to buffer.

By contrast, streaming video plays as it is downloaded.

Streaming has other advantages:

  1. Only the protion of the video that is actually viewed is downloaded. If a user clicks away 2 minutes into a 10 minute video, you won’t pay the transfer costs for the unwatched portion of that video.
  2. The video is never stored on the user’s computer for playback. This makes it harder to pirate the video.
  3. “Seek” is enabled by streaming. For instance, if I am watching a 25 minute video, and I know that the part I want starts at 22 minutes in, with streaming video I can pull the scrub bar to 22 minutes and immediately see the relevant portion of the video. With Progressive Download, I have to wait until 22 minutes of video have been downloaded. There is no “jumping ahead.”


Amazon S3 has a somewhat opaque interface. It is, in fact, downright difficult to work with.

Fortunately, the free S3 Fox for Firefox or Cloudberry S3 Explorer for Internet Explorer offer a familiar FTP like interface that make working with S3 a snap. Both also offer CloudFront integration.

The set up for all these services is a tad complicated. But the payoff, for you and your users, is well worth the effort.