AWS Cloudfront Flashcards
(36 cards)
What is Cloudfront
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.
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.
Used for dynamic, static, streaming, and interactive content.
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.
Does Cloudfront support Zone Apex Name
You can use a zone apex name on CloudFront.
Does CloudFront supports wildcard CNAME
YES
What is an Edge Location
An edge location is the location where content is cached (separate to AWS regions/AZs).
Requests are automatically routed to the nearest edge location.
What is a Regional Cache
Regional Edge Caches are located between origin web servers and global edge locations and have a larger cache.
Regional Edge Caches have larger cache-width than any individual edge location, so your objects remain in cache longer at these locations.
Regional Edge caches aim to get content closer to users.
Dynamic content goes straight to the origin and does not flow through Regional Edge caches.
Can you write to Edge Locations
Edge locations are not just read only, you can write to them too.
What is an ORIGIN ?
An origin is the origin of the files that the CDN will distribute.
Origins can be either an S3 bucket, an EC2 instance, an Elastic Load Balancer, or Route 53 – can also be external (non-AWS).
When using Amazon S3 as an origin you place all your objects within the bucket.
When using EC2 for custom origins Amazon recommend:
- Use an AMI that automatically installs the software for a web server.
- Use ELB to handle traffic across multiple EC2 instances.
- Specify the URL of your load balancer as the domain name of the origin server.
Static websites on Amazon S3 are considered custom origins ? T?F
True
Does CloudFront keep a persistent connections open with origin servers. T/F
True
Can files be uploaded via CloudFront ?
Files can also be uploaded to CloudFront.
How does one Configure HA for Origin Failover
Can set up CloudFront with origin failover for scenarios that require high availability.
Uses an origin group in which you designate a primary origin for CloudFront plus a second origin that CloudFront automatically switches to when the primary origin returns specific HTTP status code failure responses.
To distribute content with CloudFront you need to create a distribution.
The distribution includes the configuration of the CDN including:
- Content origins.
- Access (public or restricted).
- Security (HTTP or HTTPS).
- Cookie or query-string forwarding.
- Geo-restrictions.
- Access logs (record viewer activity).
What are the two types of Distributions
Web Distribution or RTMP

What does Web Distribution Contain ?
- Static and dynamic content including .html, .css, .php, and graphics files.
- Distributes files over HTTP and HTTPS.
- Add, update, or delete objects, and submit data from web forms.
- Use live streaming to stream an event in real time.
What does RTMP Distribution Contain
Distribute streaming media files using Adobe Flash Media Server’s RTMP protocol.
Allows an end user to begin playing a media file before the file has finished downloading from a CloudFront edge location.
Files must be stored in an S3 bucket.
Cache Behaviour
Allows you to configure a variety of CloudFront functionality for a given URL path pattern.
For each cache behavior you can configure the following functionality:
- The path pattern (e.g. /images/*.jpg, /images*.php).
- The origin to forward requests to (if there are multiple origins).
- Whether to forward query strings.
- Whether to require signed URLs.
- Allowed HTTP methods.
- Minimum amount of time to retain the files in the CloudFront cache (regardless of the values of any cache-control headers).
You can restrict access to content using the following methods ?
Restrict access to content using signed cookies or signed URLs.
Restrict access to objects in your S3 bucket.
A special type of user called an Origin Access Identity (OAI) can be used to restrict access to content in an Amazon S3 bucket.
By using an OAI you can restrict users so they cannot access the content directly using the S3 URL, they must connect via CloudFront.
What Allowed HTTP Methods can you Define
- GET, HEAD.
- GET, HEAD, OPTIONS.
- GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE.
For web distributions you can configure CloudFront to require that viewers use HTTPS.
What is Field-Level Encryption?
Field-level encryption adds an additional layer of security on top of HTTPS that lets you protect specific data so that it is only visible to specific applications.
Field-level encryption allows you to securely upload user-submitted sensitive information to your web servers.
The sensitive information is encrypted at the edge closer to the user and remains encrypted throughout application processing.
How long are objects cached for ?
Objects are cached for the TTL (always recorded in seconds, default is 24 hours, default max is 1 year).
Only caches for GET requests (not PUT, POST, PATCH, DELETE).
Dynamic content is cached.
Restrictions Principles
Blacklists and whitelists can be used for geography – you can only use one at a time.
There are two options available for geo-restriction (geo-blocking):
- Use the CloudFront geo-restriction feature (use for restricting access to all files in a distribution and at the country level).
- Use a 3rd party geo-location service (use for restricting access to a subset of the files in a distribution and for finer granularity at the country level).