Amazon CloudFront
Developer 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...

How CloudFront Delivers Content

The following figure and table describe the basic process CloudFront uses to deliver your content. In this example, the content is a file called image.jpg, and the content origin is an Amazon S3 bucket.

[Important]Important

The following process assumes that you make the objects in your bucket publicly readable (which means anyone who knows the bucket's name and object's name could access the object). If you'd prefer to keep the objects private and control who accesses them, see Using a Signed URL to Serve Private Content.

Overall flow

Process for Delivering Content

1

You place the original version of image.jpg in your Amazon S3 origin server bucket and make it publicly readable.

2

You create a distribution and get your distribution's domain name.

3

You create links to image.jpg in your website or web application with the CloudFront domain name.

4

When an end user requests a page that contains image.jpg, CloudFront determines which edge location would be best to serve image.jpg (in this case, we'll say it's the St. Louis location).

5

If the St. Louis edge location doesn't have a copy of image.jpg, CloudFront goes to the origin server and puts a copy of image.jpg in the St. Louis location.

6

The St. Louis edge location then serves image.jpg to the end user and then serves any other requests for that file at the St. Louis location.

7

Later, image.jpg expires, and CloudFront deletes image.jpg from the St. Louis location.

CloudFront doesn't put a new copy of image.jpg in the St. Louis location until an end user requests image.jpg again and CloudFront determines the St. Louis location should serve the image.


CloudFront repeats tasks 4–7 as needed to satisfy end-user demand for image.jpg.