Section 15: CloudFront Flashcards

1
Q

What are the possible Cloudfront origins?

A
  • S3 bucket
  • Custom Origin (http)
    • ALB
    • EC2 Instance
    • S3 static website
    • Any HTTP backend
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How is a default Cloudfront Cache Key composed?

A

The Cache Key consists the hostname and resource portion of the URL (path, without the query params)

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

What can be used the add other elements to the Cache Key in Cloudfront?

A

With a Cloudfront Cache Policy you can add other elements (HTTP headers, cookies, query params) to the Cache Key.

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

What are the minimum and maximum Cache-Control TTL in Cloudfront?

A

Cloudfront let’s you define a TTL between 0 seconds to 1 year

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

What is the Cloudfront Origin Request Policy?

A

The Origin Request Policy let’s you specify values that you want to include in origin requests without including them in the Cache Key

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

What is the difference between a Cache Policy and an Origin Request Policy in Cloudfront?

A

A Cache Policy let’s you define how the cache key is composed, while the origin request policy let’s you define which elements (cookies, headers, query params) are send to the origin.

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

You updated the files in an S3 website bucket and want these changes to reflect in Cloudfront immediately. What can you do?

A

Invalidate the cache. Either everything (/) or for a specific folder (/images/)

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

What is a Cloudfront Cache Behavior?

A

Cache Behavior let’s you configure different settings for a given URL path
pattern. i.e. set the origin for /* to an S3 bucket, but set the origin of /api/* to an EC2 instance.

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

You want users from a certain country to be blocked by Cloudfront. What can you use?

A

Cloudfront Geo Restriction

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

What is an Origin Group in Cloudfront?

A

An origin group has multiple origins. Cloudfront will try the primary origin from the group, if the connection fails, it will retry the second origin.

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