CloudFront Flashcards
What is CloudFront?
is a fast content delivery network (CDN) service that securely delivers data, videos, applications, and APIs to customers globally with low latency, high transfer speeds, all within a developer-friendly environment
What does improve CloudFront?
read performance
Where is content cached by CloudFront?
at the edge
What are the CloudFront Origins?
S3 buckets Custom Origin (HTTP)
What is used for CloudFront in front of S3 buckets?
For distributing files and caching them at the edge.
As an ingress (to upload files to S3)
What is the best and most secure way to communicate CloudFront with a S3 bucket?
Using OAI, and have a bucket policy only allowing access from that OAI
What are the CloudFront HTTP Custom Origins?
- Application Load Balancer
- EC2 instance
- S3 static website
- Any HTTP backend you want, including on-prem
What conditions must be met by an ALB or an EC2 instance behind a CloudFront distribution?
Must be public and the SG must allow public IP of Edge locations
How can you geo restrict who access your CloudFront distribution?
Using Whitelists or Blacklists to allow / prevent based on countries
How is the user country determined by CloudFront?
using a third party Geo-IP DB
What is great for CloudFront?
Great for static content that must be available everywhere
I have a CloudFront distribution in front of a S3 bucket, however when I access my CloudFront Url I am being redirected to the S3 bucket URL, why is this happening?
It is a temporary redirect, you need to wait a few hours for DNS propagation
What can you use to distribute paid shared content to premium users over the world?
CloudFront Signed URL or CloudFront Signed Cookies
What you need to define to use a CloudFront Signed URL or a CloudFront Signed Cookies?
- URL expiration
- IP ranges to access the data from
- Trusted signers (which AWS accounts can create signed URLs)
What is the difference between CloudFront Signed URL and CloudFront Signed Cookies?
- Signed URL = access to individual files (one signed URL per file)
- Signed Cookies = access to multiple files (one signed cookie for many files)