Amazon CloudFront
Getting Started Guide (API Version 2010-11-01)
Print this pageEmail this pageGo to the ForumsView the PDFShare this page on TwitterShare this page on FacebookBookmark this page on DeliciousSubmit this page to RedditSubmit this page to DiggDid this page help you?  Yes  No   Tell us about it...

Getting Started with Amazon CloudFront

CloudFront is a content delivery service from Amazon Web Services that helps you improve the performance, reliability, and availability of your web sites and applications.

You can get started very quickly with CloudFront—there are only a few steps to follow.

  1. Sign in to the AWS Management Console and open the Amazon CloudFront console at https://console.aws.amazon.com/cloudfront/.

  2. In the CloudFront console, click Create Distribution.

  3. Use the CloudFront domain name, or specify a CNAME to reference content in your web pages or applications.

The rest of this guide will take you through these steps in more detail, based on what you want to know about CloudFront. You can go on to either of the following topics.

 

What Is Amazon CloudFront and Why Do I Need It?

Amazon CloudFront works by distributing your web content (such as images, video, and so on) using a network of edge locations around the world. Your content is served from your configured Amazon S3 bucket or custom origin, to the edge location that has the shortest latency for the user who requests it. (For more information on buckets and origin servers, see Start Using Amazon CloudFront with Amazon S3.)

This concept is best illustrated by an example. Suppose you were serving this simple URL from a traditional web server, not from CloudFront: http://eoimages.gsfc.nasa.gov/images/imagerecords/57000/57723/globe_west_540.jpg. (This image is owned by NASA. The image comes from the Visible Earth website, http://visibleearth.nasa.gov/.)

Your end users can easily navigate to this URL and see the image that it returns. However, your end users might not be aware that their requests for this image were actually routed through a number of individual networks. Fundamentally, this is because the Internet is comprised of a complex collection of individual but interconnected networks. A request for data like this image is routed from one network to another until the data is found.

Suppose that your web server is in Seattle, WA, USA, and an end user makes a request to this URL from Austin, TX, USA. The traceroute list below (courtesy of www.WatchMouse.com) shows how this request is routed.

WatchMouse
U.S. map

As you can see, the request was routed 10 times before the image was retrieved. This is not an unusually high number of hops, but it does illustrate how much work is needed to retrieve even a single image.

Continuing the example, consider the case when a request is made from Europe. Because the request is still being served from a traditional web server in a single location, the request must travel over even more networks. The number of networks and the distance it must travel has significant impact on the performance, reliability, and availability of the image.

This is where CloudFront can help. By using CloudFront to distribute your data, you can dramatically decrease the routing needed. If you served this image using CloudFront and your end users requested the same image from Europe, they would see the same object, but their request would take a very different path. The number of networks that the request uses is dramatically reduced. This is because CloudFront will detect where a request is being made from and service that request from a nearby edge location. This improves performance: end users get lower latency (the time it takes to load the first byte of the object) and higher data transfer rates. You also get increased reliability and availability because there is no longer a central point of failure—copies of your object are now held in edge locations around the world.

CloudFront improves performance in extreme cases, such as when a user makes a request from Europe to data stored originally in the United States. However, CloudFront works just as well at more granular levels.

 

Go to Start Using Amazon CloudFront with Amazon S3.