09 Content Delivery Flashcards

1
Q

Describe CloudFront.

A

CloudFront is a distributed Content Delivery Network (CDN) that brings content closer to users by caching it at various edge locations.

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

Define the term ‘Origin’ in the context of CloudFront.

A

The Origin is the location of the content in CloudFront, which can be either an S3 bucket or a Custom Origin.

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

How does a Distribution function in CloudFront?

A

A Distribution is the unit of configuration in CloudFront that can have multiple origins and is identified by a unique DNS name (e.g., *.cloudfront.net).

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

What are Edge Locations in CloudFront?

A

Edge Locations are local caches for data in CloudFront, while Regional Edge Caches serve multiple edge locations.

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

Explain the purpose of Behaviours in CloudFront.

A

Behaviours are attached to the distribution based on path matching and configure the origin, caching, and security settings.

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

How does CloudFront interact with other services?

A

CloudFront is a global service that interacts with other services like ACM (AWS Certificate Manager) and CloudWatch, primarily in the us-east-1 region.

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

What is the significance of Price Class in CloudFront Distribution settings?

A

Price Class allows users to select a subset of origins for their distribution, such as only those in North America and Europe.

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

Describe the role of WAF integration in CloudFront.

A

WAF integration in CloudFront allows for the implementation of web application firewall rules to protect applications from common web exploits.

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

What are Alternate domain names and SSL certificates used for in CloudFront?

A

Alternate domain names and SSL certificates are used to secure connections and provide custom domain support for CloudFront distributions.

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

How does Logging function in CloudFront?

A

Logging in CloudFront provides detailed records of requests made to the distribution, which can be used for analysis and monitoring.

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

Explain the concept of Path pattern in Behaviour settings.

A

Path pattern in Behaviour settings allows the use of wildcards to match specific request paths for routing and configuration.

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

What are Allowed HTTP methods in CloudFront Behaviour settings?

A

Allowed HTTP methods specify which types of HTTP requests (e.g., GET, POST) are permitted for a particular behaviour in CloudFront.

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

Describe the Viewer protocol policy options available in CloudFront.

A

Viewer protocol policy options include ‘HTTP and HTTPS’, ‘Redirect HTTP to HTTPS’, and ‘HTTPS Only’, determining how requests are handled.

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

What is Viewer Access in CloudFront?

A

Viewer Access restricts access to content based on user authentication, requiring a cookie or a pre-signed URL.

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

How does Field-level Encryption work in CloudFront?

A

Field-level Encryption encrypts specific fields at the edge before they are sent over HTTPS to the origin, enhancing data security.

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

Define the supported origin types in CloudFront.

A

The supported origin types in CloudFront include S3 buckets and Custom Origins.

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

What is the purpose of the Origin path in S3 within CloudFront?

A

The Origin path in S3 maps requests to a specific sub-path within the S3 bucket, allowing for more granular content delivery.

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

Describe the purpose of Origin Access Control in CloudFront.

A

Origin Access Control ensures that the S3 bucket’s contents can only be accessed via CloudFront.

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

How do Origin groups enhance availability in CloudFront?

A

Origin groups allow multiple origins to be attached to a single behavior, improving availability.

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

Define the role of ACM in CloudFront security.

A

ACM (AWS Certificate Manager) is used to manage SSL certificates for securing connections in CloudFront.

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

Explain the significance of Server Name Indication (SNI) in CloudFront.

A

SNI is required because multiple distributions will use the same CloudFront IP, and it occurs during the TLS handshake.

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

What is the requirement for SSL certificates used with CloudFront?

A

Both SSL connections must use public certificates, and the certificate must be stored in ‘us-east-1’.

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

How can access to CloudFront distributions be restricted?

A

Access can be restricted using pre-signed URLs and signed cookies.

24
Q

Describe the function of Origin Access Identities (OAI) in CloudFront.

A

OAIs are associated with a distribution and can be referenced in S3 bucket policies to ensure origins can only be accessed through CloudFront.

25
Q

What are the implications of using self-signed certificates with CloudFront?

A

Self-signed certificates are not supported; both connections must use public certificates.

26
Q

How can custom origins be secured in CloudFront?

A

Custom origins can be secured using private headers and IP-based blocks.

27
Q

What happens during the TLS handshake in CloudFront?

A

During the TLS handshake, Server Name Indication (SNI) is used to identify the hostname being connected to, allowing multiple distributions to share the same IP.

28
Q

Explain the relationship between CloudFront and MediaPackage & MediaStore.

A

MediaPackage and MediaStore are services that can be integrated with CloudFront for media delivery.

29
Q

What is the default domain used by CloudFront?

A

The default domain is ‘*.cloudfront.net’, which uses the default CloudFront certificate.

30
Q

How can custom headers be utilized in CloudFront?

A

Custom headers can be added to origin fetches to provide additional context or authentication.

31
Q

What is the origin protocol in CloudFront?

A

The origin protocol defines how CloudFront connects to the origin using HTTPS, requiring a public certificate.

32
Q

How can ports be configured in CloudFront?

A

Ports can be configured for HTTP and HTTPS requests in custom origins.

33
Q

Describe the difference between Trusted Signer and Trusted Key Groups.

A

Trusted Signer is the legacy approach at the account level, while Trusted Key Groups are recommended for new workloads.

34
Q

How is a signed URL or cookie generated in the context of Trusted Key Groups?

A

A signed URL or cookie is generated using a public certificate, with the signing done by a private certificate.

35
Q

Explain the limitation of pre-signed URLs.

A

Pre-signed URLs only allow access to a single object.

36
Q

What is the purpose of cookies in relation to access control?

A

Cookies can be used for multiple objects, allowing broader access compared to pre-signed URLs.

37
Q

Define cookie policies in the context of CloudFront.

A

Cookie policies can restrict access to specific paths within the distribution.

38
Q

How does geo-restriction work in CloudFront?

A

Geo-restriction is applied to the entire distribution and can deny-list or allow-list specific countries.

39
Q

Describe the caching process when a user requests data from CloudFront.

A

When a user requests data, they connect to a closed edge location, which responds using its local cache or the regional edge cache; if neither has the content, an origin fetch is performed.

40
Q

What happens if neither the local cache nor the regional edge cache has the requested content?

A

An origin fetch is performed to retrieve the content.

41
Q

Explain the caching behavior of CloudFront regarding write operations.

A

CloudFront does not cache writes; all write operations go directly to the origin.

42
Q

What occurs when caching is enabled and the TTL expires?

A

CloudFront returns cached information until the TTL expires or an invalidation is performed; after TTL, it forwards requests to the origin.

43
Q

What does a 304 Not Modified response indicate?

A

It indicates that the cached version of the content is still current.

44
Q

How is the default TTL set in CloudFront?

A

The default TTL is set at the distribution level, but origins can use headers like Cache-Control: max-age to influence caching.

45
Q

What are invalidations in CloudFront?

A

Invalidations are applied to a distribution and can be restricted to certain objects based on a pattern.

46
Q

What architectural pattern is recommended for fine-grained control over caching?

A

Versioned file names are the recommended architectural pattern for fine-grained control over caching.

47
Q

Define the cache key in the context of CloudFront requests.

A

The cache key of a request controls whether it matches previous requests.

48
Q

Describe the role of cache policy in caching.

A

Cache policy controls how caching is managed, including what elements are included in the cache key such as URL, query string parameters, cookies, request headers, and compression settings.

49
Q

How are query string parameters treated by default in caching?

A

By default, query string parameters are not considered for caching or forwarded to the origin, but specific parameters can be configured to be included.

50
Q

Define the purpose of Lambda@Edge.

A

Lambda@Edge allows lightweight Lambda functions to run at edge locations, enabling adjustments to data between the viewer and the origin.

51
Q

What runtimes are supported by Lambda@Edge?

A

Only Python and Node.js are supported as runtimes for Lambda@Edge.

52
Q

Explain the limitations of Lambda@Edge regarding VPCs and Lambda Layers.

A

Lambda@Edge does not support VPCs and Lambda Layers, and it has restrictions on maximum runtime and resources.

53
Q

How can Lambda functions be utilized in traffic flows?

A

Lambda functions can run as part of all four traffic flows: viewer request, origin request (only for cache misses), origin response (only for cache misses), and viewer response.

54
Q

Describe a use case for Lambda functions in viewer requests.

A

Lambda functions in viewer requests can edit the request URL for A/B testing or modify content based on the user’s location.

55
Q

What is the significance of request headers in caching?

A

Request headers can be selectively included in the cache key, but all headers cannot be used; this allows for customization based on specific headers.

56
Q

How do cookies affect caching behavior?

A

Cookies are not considered by default in caching, but specific cookies can be added to the cache key to influence caching behavior.

57
Q

What is the function of compression settings in cache policy?

A

Compression settings can be part of the cache policy, affecting how data is stored and transmitted in the cache.