CloudFront Flashcards

1
Q

What is CloudFront?

A

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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What does improve CloudFront?

A

read performance

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Where is content cached by CloudFront?

A

at the edge

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the CloudFront Origins?

A
S3 buckets
Custom Origin (HTTP)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is used for CloudFront in front of S3 buckets?

A

For distributing files and caching them at the edge.

As an ingress (to upload files to S3)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What is the best and most secure way to communicate CloudFront with a S3 bucket?

A

Using OAI, and have a bucket policy only allowing access from that OAI

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the CloudFront HTTP Custom Origins?

A
  • Application Load Balancer
  • EC2 instance
  • S3 static website
  • Any HTTP backend you want, including on-prem
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What conditions must be met by an ALB or an EC2 instance behind a CloudFront distribution?

A

Must be public and the SG must allow public IP of Edge locations

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How can you geo restrict who access your CloudFront distribution?

A

Using Whitelists or Blacklists to allow / prevent based on countries

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

How is the user country determined by CloudFront?

A

using a third party Geo-IP DB

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is great for CloudFront?

A

Great for static content that must be available everywhere

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

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?

A

It is a temporary redirect, you need to wait a few hours for DNS propagation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What can you use to distribute paid shared content to premium users over the world?

A

CloudFront Signed URL or CloudFront Signed Cookies

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What you need to define to use a CloudFront Signed URL or a CloudFront Signed Cookies?

A
  • URL expiration
  • IP ranges to access the data from
  • Trusted signers (which AWS accounts can create signed URLs)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the difference between CloudFront Signed URL and CloudFront Signed Cookies?

A
  • Signed URL = access to individual files (one signed URL per file)
  • Signed Cookies = access to multiple files (one signed cookie for many files)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

How is CloudFront protected?

A

DDoS protection thanks to AWS Shield and Web Application Firewall

17
Q

How long should be valid for a CloudFront signed URL for shared content?

A

a few minutes

18
Q

How long should be valid for a CloudFront signed URL for private content?

A

you can make it last for years

19
Q

What is not great for CloudFront that it is S3 CRR?

A

for dynamic content that needs to be available at low-latency in few regions

20
Q

What is based on CloudFront Edges caches?

A

o Headers
o Session Cookies
o Query String Parameters

21
Q

What can you use to control the CloudFront cache?

A

TTL

22
Q

What are the range and default values of CloudFront TTL?

A

0 seconds <= 1 day <= 1 year

23
Q

How can the origin set the CloudFront TTL?

A

using the Cache-Control header, Expires header…

24
Q

What is used for the CreateInvalidation API in CloudFront?

A

To invalidate part of the cache

25
Q

What can you invalidate in CloudFront’s cache?

A
you can specify either the path for individual files or a path that ends with the * wildcard, which might apply to one file or to many, as shown in the following examples:
o	* (everything)
o	/images/image1.jpg ()
o	/images/image* ()
o	/images/* ()
26
Q

What is a common strategy in CloudFront for serving dynamic content?

A

to separate your cache for your dynamic requests and your static requests by using two different CloudFront distributions

27
Q

What can you configure in CloudFront in terms of security policies besides the geo restriction policies?

A
  • Viewer Protocol Policy

- Origin Protocol Policy (HTTP or S3)

28
Q

What are the options for CloudFront Viewer Protocol Policy?

A

o HTTP and HTTPS
o HTTP to HTTPS
o HTTPS only

29
Q

What are the options for CloudFront Origin Protocol Policy?

A

o HTTPS only

o Match Viewer (HTTP => HTTP & HTTPS => HTTPS)

30
Q

What communication is controlled by the CloudFront Viewer Protocol Policy?

A

between the client and the edge location

31
Q

What communication is controlled by the CloudFront Origin Protocol Policy?

A

between the edge location and the origin