CloudFront: A CDN for Amazon's Simple Storage Service


Amazon has added a new service to their arsenal. CloudFront is a content delivery service that works closely with S3 to make public objects in your account available through a distribution network with edge locations in the US, Europe and Asia.

CloudFront uses two techniques to deliver your data quickly. It caches S3 objects in the network's edge locations (for a configurable amount of time), and automatically routes incoming requests to the edge location nearest to the requester. If you provide content to people who are distant from an S3 server location, this new service could significantly improve download speeds for your users.

The price for distribution is based on the amount of data transferred and the number of requests, with differential pricing depending on the edge location that serves the content. Bear in mind that you will also incur the standard S3 service costs whenever an object is provided to an edge location.

It is straight-forward to create a CloudFront "distribution" based on one of your S3 buckets. The AWS blog announcement mentions a number of tools and libraries that include support for the new service. My own JetS3t Java library has also been updated with basic API support for the new service, though for now you will need to download the latest code from CVS to access this feature. If you are keen to get your hands dirty, go get a CVS checkout and review the sample code in org.jets3t.samples.CloudFrontSamples.

Inevitably, there are some drawbacks to the service:

Despite these drawbacks, CloudFront is a very promising new tool for anyone who needs to distribute a lot of content to a broad audience.

Tags: AWS Coding JetS3t