Networking & Content Delivery | Amazon CloudFront Flashcards
What is Amazon CloudFront?
General
Amazon CloudFront | Networking & Content Delivery
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.
What can I do with Amazon CloudFront?
General
Amazon CloudFront | Networking & Content Delivery
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.
How do I get started with Amazon CloudFront?
General
Amazon CloudFront | Networking & Content Delivery
Click the “Create Free Account” button on the Amazon CloudFront detail page. If you choose to use another AWS service as the origin for the files served through Amazon CloudFront, you must sign up for that service before creating CloudFront distributions.
How do I use Amazon CloudFront?
General
Amazon CloudFront | Networking & Content Delivery
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.
How does Amazon CloudFront provide higher performance?
General
Amazon CloudFront | Networking & Content Delivery
Amazon CloudFront employs a global network of edge locations and regional edge caches that cache copies of your content close to your viewers. Amazon CloudFront ensures that end-user requests are served by the closest edge location. As a result, viewer requests travel a short distance, improving performance for your viewers. For files not cached at the edge locations and the regional edge caches, 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.
How does Amazon CloudFront lower my costs to distribute content over the Internet?
General
Amazon CloudFront | Networking & Content Delivery
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.
Additionally, if you are using an AWS origin (e.g., Amazon S3, Amazon EC2, etc.), effective December 1, 2014, we are no longer charging for AWS data transfer out to Amazon CloudFront. This applies to data transfer from all AWS regions to all global CloudFront edge locations.
How does Amazon CloudFront speed up my entire website?
General
Amazon CloudFront | Networking & Content Delivery
Amazon CloudFront uses standard cache control headers you set on your files to identify static and dynamic content. Delivering all your 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.
How is Amazon CloudFront different from Amazon S3?
General
Amazon CloudFront | Networking & Content Delivery
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.
How is Amazon CloudFront different from traditional content delivery solutions?
General
Amazon CloudFront | Networking & Content Delivery
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 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.
What types of content does Amazon CloudFront support?
General
Amazon CloudFront | Networking & Content Delivery
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.
Does Amazon CloudFront support delivery of dynamic content?
General
Amazon CloudFront | Networking & Content Delivery
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 streams, video streams, 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.
Does Amazon CloudFront work with non-AWS origin servers?
General
Amazon CloudFront | Networking & Content Delivery
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.
Does Amazon CloudFront offer a Service Level Agreement (SLA)?
General
Amazon CloudFront | Networking & Content Delivery
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.
Can I use the AWS Management Console with Amazon CloudFront?
General
Amazon CloudFront | Networking & Content Delivery
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.
What tools and libraries work with Amazon CloudFront?
General
Amazon CloudFront | Networking & Content Delivery
There are a variety of tools for managing your Amazon CloudFront distribution and libraries for various programming languages available in our resource center.
Can I point my zone apex (example.com versus www.example.com) at my Amazon CloudFront distribution?
Edge Locations
Amazon CloudFront | Networking & Content Delivery
Yes. By using Amazon Route 53, AWS’s authoritative DNS service, you can configure an ‘Alias’ record that lets you map the apex or root (example.com) of your DNS name to your Amazon CloudFront distribution. Amazon Route 53 will then respond to each request for an Alias record with the right IP address(es) for your CloudFront distribution. Route 53 doesn’t charge for queries to Alias records that are mapped to a CloudFront distribution. These queries are listed as “Intra-AWS-DNS-Queries” on the Amazon Route 53 usage report.
What is CloudFront Regional Edge Cache?
Edge Locations
Amazon CloudFront | Networking & Content Delivery
A default CloudFront feature that brings more of your content close to your viewers, even when the content is not popular to stay at a particular edge location. This helps improve performance for your viewers while lowering the operational burden and cost of scaling your origin resources.
How does regional edge cache work?
Edge Locations
Amazon CloudFront | Networking & Content Delivery
Amazon CloudFront has added several regional edge cache locations globally, at close proximity to your viewers. These locations sit in between your origin webserver and the global edge locations that serve traffic directly to your viewers. As the popularity of your objects reduce, individual edge locations may evict those objects to make room for more popular content. Regional Edge Caches have larger cache width than any individual edge location, so objects remain in cache longer at these regional edge caches. This helps keep more of your content closer to your viewers, reducing the need for CloudFront to go back to your origin webserver and improving overall performance for viewers. For instance, our edge locations in Europe now go to the regional edge cache in Frankfurt to fetch an object before going back to your origin webserver. Regional Edge Cache locations are currently utilized only for requests that need to go back to a custom origin; i.e. requests to S3 origins will skip regional edge cache locations.
Is regional edge cache feature enabled by default?
Edge Locations
Amazon CloudFront | Networking & Content Delivery
Yes. You do not need to make any changes to your CloudFront distributions; this feature is enabled by default for all new and existing CloudFront distributions. There are no additional charges to use this feature.
Where are the edge network locations used by Amazon CloudFront located?
Edge Locations
Amazon CloudFront | Networking & Content Delivery
Amazon CloudFront uses a global network of edge locations and regional edge caches for content delivery. You can see a full list of Amazon CloudFront locations here.
Can I choose to serve content (or not serve content) to specified countries?
Edge Locations
Amazon CloudFront | Networking & Content Delivery
Yes, the Geo Restriction feature lets you specify a list of countries in which your users can access your content. Alternatively, you can specify the countries in which your users cannot access your content. In both cases, CloudFront responds to a request from a viewer in a restricted country with an HTTP status code 403 (Forbidden).
How accurate is your GeoIP database?
Edge Locations
Amazon CloudFront | Networking & Content Delivery
The accuracy of the IP Address to country lookup database varies by region. Based on recent tests, our overall accuracy for the IP address to country mapping is 99.8%.
Can I serve a custom error message to my end users?
Edge Locations
Amazon CloudFront | Networking & Content Delivery
Yes, you can create custom error messages (for example, an HTML file or a .jpg graphic) with your own branding and content for a variety of HTTP 4xx and 5xx error responses. Then you can configure Amazon CloudFront to return your custom error messages to the viewer when your origin returns one of the specified errors to CloudFront.
How long will Amazon CloudFront keep my files at the edge locations?
Edge Locations
Amazon CloudFront | Networking & Content Delivery
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.
How do I remove an item from Amazon CloudFront edge locations?
Edge Locations
Amazon CloudFront | Networking & Content Delivery
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.
Is there a limit to the number of invalidation requests I can make?
Compliance
Amazon CloudFront | Networking & Content Delivery
If you’re invalidating objects individually, you can have invalidation requests for up to 3,000 objects per distribution in progress at one time. This can be one invalidation request for up to 3,000 objects, up to 3,000 requests for one object each, or any other combination that doesn’t exceed 3,000 objects.
If you’re using the * wildcard, you can have requests for up to 15 invalidation paths in progress at one time. You can also have invalidation requests for up to 3,000 individual objects per distribution in progress at the same time; the limit on wildcard invalidation requests is independent of the limit on invalidating objects individually. If you exceed this limit, further invalidation requests will receive an error response until one of the earlier request 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.
Is Amazon CloudFront PCI compliant?
Compliance
Amazon CloudFront | Networking & Content Delivery
Yes, Amazon CloudFront is included in the set of services that are compliant with the Payment Card Industry Data Security Standard (PCI DSS) Merchant Level 1, the highest level of compliance for service providers. Please see our developer’s guide for more information.
Is Amazon CloudFront HIPAA eligible?
HTTP and HTTP/2
Amazon CloudFront | Networking & Content Delivery
Yes, AWS has expanded its HIPAA compliance program to include Amazon CloudFront as a HIPAA eligible service. If you have an executed Business Associate Agreement (BAA) with AWS, you can use Amazon CloudFront to accelerate the delivery of protected health information (PHI). For more information, see HIPAA Compliance and our developer’s guide.
What types of HTTP requests are supported by Amazon CloudFront?
HTTP and HTTP/2
Amazon CloudFront | Networking & Content Delivery
Amazon CloudFront currently supports GET, HEAD, POST, PUT, PATCH, DELETE and OPTIONS requests.
Does Amazon CloudFront cache POST responses?
HTTP and HTTP/2
Amazon CloudFront | Networking & Content Delivery
Amazon CloudFront does not cache the responses to POST, PUT, DELETE, and PATCH requests – these requests are proxied back to the origin server. You may enable caching for the responses to OPTIONS requests.