Amazon CloudFront FAQs


Q. What is Amazon CloudFront?
Amazon CloudFront is a web service that gives businesses and web application developers an easy and cost effective way to distribute content with low latency and high data transfer speeds. Like other AWS services, Amazon CloudFront is a self-service, pay-per-use offering, requiring no long term commitments or minimum fees. With CloudFront, your files are delivered to end-users using a global network of edge locations.
Q. What can I do with Amazon CloudFront?
Amazon CloudFront provides a simple API that lets you:
  • Distribute content with low latency and high data transfer rates by serving requests using a network of edge locations around the world.
  • Get started without negotiating contracts and minimum commitments.
Q. How do I get started with Amazon CloudFront?
Click the “Sign up for Amazon CloudFront” button on the Amazon CloudFront detail page. If you choose to use another Amazon Web Service as the origin for the files served through Amazon CloudFront, you must sign up for that service before creating CloudFront distributions.
Q. How do I use Amazon CloudFront?

To use Amazon CloudFront, you:

  • For static files, store the definitive versions of your files in one or more origin servers. These could be Amazon S3 buckets. For your dynamically generated content that is personalized or customized, you can use Amazon EC2 – or any other web server – as the origin server. These origin servers will store or generate your content that will be distributed through Amazon CloudFront.
  • Register your origin servers with Amazon CloudFront through a simple API call. This call will return a CloudFront.net domain name that you can use to distribute content from your origin servers via the Amazon CloudFront service. For instance, you can register the Amazon S3 bucket “bucketname.s3.amazonaws.com” as the origin for all your static content and an Amazon EC2 instance “dynamic.myoriginserver.com” for all your dynamic content. Then, using the API or the AWS Management Console, you can create an Amazon CloudFront distribution that might return “abc123.cloudfront.net” as the distribution domain name.
  • Include the cloudfront.net domain name, or a CNAME alias that you create, in your web application, media player, or website. Each request made using the cloudfront.net domain name (or the CNAME you set-up) is routed to the edge location best suited to deliver the content with the highest performance. The edge location will attempt to serve the request with a local copy of the file. If a local copy is not available, Amazon CloudFront will get a copy from the origin. This copy is then available at that edge location for future requests.
Q. How does Amazon CloudFront provide higher performance?
Amazon CloudFront employs a network of edge locations that cache copies of popular files close to your viewers. Amazon CloudFront ensures that end-user requests are served by the closest edge location. As a result, requests travel shorter distances to request objects, improving performance. For files not cached at the edge locations, Amazon CloudFront keeps persistent connections with your origin servers so that those files can be fetched from the origin servers as quickly as possible. Finally, Amazon CloudFront uses additional optimizations – e.g. wider TCP initial congestion window – to provide higher performance while delivering your content to viewers.
Q. How does Amazon CloudFront lower my costs to distribute content over the Internet?
Like other AWS services, Amazon CloudFront has no minimum commitments and charges you only for what you use. Compared to self-hosting, Amazon CloudFront spares you from the expense and complexity of operating a network of cache servers in multiple sites across the internet and eliminates the need to over-provision capacity in order to serve potential spikes in traffic. Amazon CloudFront also uses techniques such as collapsing simultaneous viewer requests at an edge location for the same file into a single request to your origin server. This reduces the load on your origin servers reducing the need to scale your origin infrastructure, which can bring you further cost savings.
Q. How is Amazon CloudFront different from Amazon S3?
Amazon CloudFront is a good choice for distribution of frequently accessed static content that benefits from edge delivery—like popular website images, videos, media files or software downloads. Amazon S3 will continue to be the solution of choice for delivering content where individual files are only accessed infrequently, as you will save the costs of copying less popular files from Amazon S3 to the edge locations used by Amazon CloudFront.
Q. How is Amazon CloudFront different from traditional content delivery solutions?
Amazon CloudFront lets you quickly obtain the benefits of high performance content delivery without negotiated contracts or high prices. Amazon CloudFront gives all developers access to inexpensive, pay-as-you-go pricing – with a self-service model. Developers also benefit from tight integration with other Amazon Web Services. The solution is simple to use with Amazon S3, Amazon EC2, and Elastic Load Balancing as an origin servers, giving developers a powerful combination of durable storage and high performance delivery. Amazon CloudFront also integrates with Amazon Route 53 and AWS CloudFormation for further performance benefits and ease of configuration.

Q. What is the price of Amazon CloudFront?

Amazon CloudFront charges are based on actual usage of the service in three areas: Data Transfer, HTTP/HTTPS Requests, and Invalidation Requests.

  • Data Transfer

You will be charged for the volume of data transferred out of the Amazon CloudFront edge locations, measured in GB. If you are using other Amazon Web Services as the origins of your files, you will be charged separately for use of those services, including for storage, compute hours, GET requests and data transfer out of that service to Amazon CloudFront’s edge locations. Usage tiers for data transfer are measured separately for each geographic region. You can see Amazon CloudFront data transfer pricing here.

  • HTTP/HTTPS Requests

You will be charged for number of HTTP/HTTPS requests made to Amazon CloudFront for your content. You can see the rates for HTTP/HTTPS requests here.

  • Invalidation Requests

You may invalidate up to 1,000 files each month from Amazon CloudFront at no additional charge. Beyond the first 1,000 files, you will be charged per file for each file listed in your invalidation requests. You can see the rates for invalidation requests here.

Usage tiers for data transfer are measured separately for each geographic region. The prices above are exclusive of applicable taxes, fees, or similar governmental charges, if any exist, except as otherwise noted. Effective January 1, 2010, the prices for usage out of Japan edge locations are inclusive of Japan consumption tax.

Q. Where are the edge locations used by Amazon CloudFront located?
Amazon CloudFront uses a network of edge locations in major markets worldwide. You can see the current list of edge locations on the Amazon CloudFront detail page.
Q. What types of content does Amazon CloudFront support?
Amazon CloudFront supports all files that can be served over HTTP. This includes dynamic web pages, such as HTML or PHP pages, any popular static files that are a part of your web application, such as website images, audio, video, media files or software downloads. For on-demand media files, you can also choose to stream your content using RTMP delivery. Amazon CloudFront also supports delivery of live media over HTTP.
Q. Does Amazon CloudFront support delivery of dynamic content?
Yes. Amazon CloudFront can be used to deliver dynamic web applications over HTTP. These applications may include static content, dynamic content, or a whole site with a mixture of the two. Viewer requests are automatically routed to the Amazon CloudFront edge location with the lowest latency and carried forward to your Amazon EC2 instances running in AWS or to another origin server over optimized network connections which work to speed up the delivery of content on your website.
Q. How does Amazon CloudFront speed up my entire website?
Amazon CloudFront uses standard cache control headers you set on your files to identify static and dynamic content. Delivering all you content using a single Amazon CloudFront distribution helps you make sure that performance optimizations are applied to your entire website or web application. When using AWS origins, you benefit from improved performance, reliability, and ease of use as a result of AWS’s ability to track and adjust origin routes, monitor system health, respond quickly when any issues occur, and the integration of Amazon CloudFront with other AWS services. You also benefit from using different origins for different types of content on a single site – e.g. Amazon S3 for static objects, Amazon EC2 for dynamic content, and custom origins for third-party content – paying only for what you use.
Q. Does Amazon CloudFront work with non-AWS origin servers?
Yes. Amazon CloudFront works with any origin server that holds the original, definitive versions of your content, both static and dynamic. There is no additional charge to use a custom origin.
Q. What types of HTTP requests are supported by Amazon CloudFront?
HTTP GET and HEAD requests are currently supported by Amazon CloudFront. Over time, we will add support for POST requests.
Q. Does Amazon CloudFront support access controls for paid or private content?
Yes, Amazon CloudFront has an optional private content feature. When this option is enabled, Amazon CloudFront will only deliver files when you say it is okay to do so by securely signing your requests.
Q. Does Amazon CloudFront support CNAMEs?
Yes. You can add up to ten CNAME aliases to each of your distributions.
Q. How does Amazon CloudFront handle query string parameters in the URL?
A query string may be optionally configured to be part of the cache key for identifying objects in the Amazon CloudFront cache. This helps you build dynamic web pages (e.g. search results) that may be cached at the edge for some amount of time.
Q. How does Amazon CloudFront handle HTTP cookies?
HTTP Cookies are often used to track site visitors or to implement basic personalization. Currently, Amazon CloudFront ignores cookies and does not forward these to either the origin or to the viewer. We may explore adding support for HTTP cookies in the future.
Q. How long will Amazon CloudFront keep my files at the edge locations?
By default, if no cache control header is set, each edge location checks for an updated version of your file whenever it receives a request more than 24 hours after the previous time it checked the origin for changes to that file. This is called the “expiration period.” You can set this expiration period as short as 0 seconds, or as long as you’d like, by setting the cache control headers on your files in your origin. Amazon CloudFront uses these cache control headers to determine how frequently it needs to check the origin for an updated version of that file. For expiration period set to 0 seconds, Amazon CloudFront will revalidate every request with the origin server. If your files don’t change very often, it is best practice to set a long expiration period and implement a versioning system to manage updates to your files.
Q. How do I remove an item from Amazon CloudFront edge locations?
There are multiple options for removing a file from the edge locations. You can simply delete the file from your origin and as content in the edge locations reaches the expiration period defined in each object’s HTTP header, it will be removed. In the event that offensive or potentially harmful material needs to be removed before the specified expiration time, you can use the Invalidation API to remove the object from all Amazon CloudFront edge locations. You can see the charge for making invalidation requests here.
Q. Is there a limit to the number of invalidation requests I can make?
There are no limits on the total number of files you can invalidate; however, each invalidation request you make can have a maximum of 1,000 files. In addition, you can only have 3 invalidation requests in progress at any given time. If you exceed this limit, further invalidation requests will receive an error response until one of the earlier requests completes. You should use invalidation only in unexpected circumstances; if you know beforehand that your files will need to be removed from cache frequently, it is recommended that you either implement a versioning system for your files and/or set a short expiration period.
Q. Does Amazon CloudFront support streaming protocols?
Yes. With Amazon CloudFront, you can create streaming distributions for your on-demand content. These streaming distributions use Adobe's Flash Media Server (version 3.5) to deliver your content using the RTMP protocol and several of its variants.
Q. What is streaming? Why would I want to stream my content?
Generally, streaming refers to proprietary protocols that are used to deliver audio and video to end users on the internet. These protocols are different than the HTTP protocol used to deliver web pages and other content because streaming protocols deliver content in real time – the viewers watch the bytes as they are delivered.

Streaming content has several potential benefits for you and your end-users:

  • Streaming can give viewers more control over their viewing experience. For instance, it is easier for a viewer to seek forward in a video using streaming than using traditional download delivery.
  • Streaming can give you more control over your content, as no file remains on the viewer's computer when they finish watching a video.
  • Streaming can help you reduce your costs, as it only delivers portions of a media file that the viewers actually watch. In contrast, with traditional downloads, frequently the whole media file will be downloaded by the viewers, even if they only watch a portion of the file.
You can only stream audio and video files – for other types of content, you should use CloudFront’s HTTP delivery. Likewise, if you do want users to retain a local copy of your audio or video file for offline playback, you should use HTTP delivery too.
Q. Does Amazon CloudFront support live streaming to multiple platforms?
Yes. Amazon CloudFront provides you two options to easily and cost-effectively deliver live events over HTTP to multiple platforms:
  • Live Streaming with Adobe’s Flash Media Server 4.5: Amazon CloudFront can be used with Amazon EC2 running Adobe's Flash Media Server (FMS 4.5) for live HTTP streaming to both Flash Player and Apple iOS devices. Amazon EC2 (running FMS 4.5) must be configured as the origin for a CloudFront download distribution. We've made this simple for you by creating an AWS CloudFormation template that handles all of the provisioning and sequencing for all the AWS resources you need for this live streaming stack. Amazon CloudFront provides you the scale and flexible pay-as-you-go pricing model, while the use of HTTP protocol for streaming your live event offers your viewers easy access to your live content. Using Amazon CloudFront for live streaming also gives you full control of your FMS origin server so you can configure it to best work with the specific nature of your event. In addition, you can choose the Amazon EC2 instance type and AWS region that best meet the needs of your live event. A detailed tutorial for setting-up live HTTP streaming using CloudFront is available here.
  • Live Smooth Streaming using Windows Media Services: You can also use Amazon CloudFront and Amazon EC2 running Windows Media Services for live Smooth Streaming.With this solution, you can deliver live media over HTTP to both Microsoft Silverlight clients and Apple iOS devices. We've made it simple to get started by creating a Live Smooth Streaming tutorial and an AWS CloudFormation template to automate the provisioning of AWS resources for your live streaming stack. You only pay for the AWS resources you consume, and have full control over the origin server (Amazon EC2 instance running Windows Media Services) so you can configure additional IIS Live Smooth Streaming functionality.
Q. Does Amazon CloudFront support content coding?
Yes. Amazon CloudFront supports content coding. For more information about how to take advantage of this feature, please see the Developer’s Guide.
Q. Can I use Amazon CloudFront if I expect usage peaks higher than 1,000 Mbps or 1,000 RPS?
Yes. Complete our request for higher limits here, and we will add more capacity to your account within two business days.
Q: Is there a limit to the number of distributions my Amazon CloudFront account may deliver?
Each Amazon CloudFront account is limited to a maximum of 100 distributions.
Q: What is the maximum size of a file that can be delivered through Amazon CloudFront?
The maximum size of a single file that can be delivered through Amazon CloudFront is 20 GB. This limit applies to all Amazon CloudFront distributions.
Q: What tools and libraries work with Amazon CloudFront?
There are a variety of tools for managing your Amazon CloudFront distribution and libraries for various programming languages available in our resource center.
Q: Can I get access to request logs for content delivered through Amazon CloudFront?
Yes. When you create or modify a CloudFront distribution, you can enable access logging. When enabled, this feature will automatically write detailed log information in a W3C extended format into an Amazon S3 bucket that you specify.
Q: Can I use the AWS Management Console with Amazon CloudFront?
Yes. You can use the AWS Management Console to configure and manage Amazon CloudFront though a simple, point-and-click web interface. The AWS Management Console supports most of Amazon CloudFront’s features, letting you get Amazon CloudFront’s low latency delivery without writing any code or installing any software. Access to the AWS Management Console is provided free of charge at https://console.aws.amazon.com
Q: Does Amazon CloudFront offer a Service Level Agreement (SLA)?
Yes. The Amazon CloudFront SLA provides for a service credit if a customer’s monthly uptime percentage is below our service commitment in any billing cycle. More information can be found here
©2011, Amazon Web Services LLC or its affiliates. All rights reserved.