CACHING, DELIVERY AND EDGE Flashcards
What is best practice in the context of Amazon CloudFront to ensure that users will always receive the latest version of a file, instead of a cached one.
Using versioned file names, e.g. “foo_v1.jpg” rather than “foo.jpg”
How do you set the TTL or “expiry date & time” for an object in the context of Amazon CloudFront? (for Custom Origins and S3)
Custom Origin: via headers
S3: via object metadata
What are the Minimum TTL and Maximum TTL, that are set on the behavior of a CloudFront distribution, used for?
They define lower and upper limits for TTLs values. For instance, if for a object a TTL is defined that is higher than the Maximum TTL, CloudFront will use the Maximum TTL value, rather than the TTL defined for the object.
What’s the “Expires” header used for in the context of Amazon CloudFront?
Defines the expiry date & time for an individual object distributed by CloudFront
What are the “Cache-Control max-age” and “Cache-Control s-maxage” headers used for in the context of Amazon CloudFront?
Define the TTL for an individual object distributed by CloudFront (in seconds)
What’s the default TTL used by Amazon CloudFront?
24 hours (defined at behavior level)
What is a “Trusted Signer” in the context of Amazon CloudFront?
A party that is allowed to generate signed-URLs for a given CloudFront distribution.
Does CloudFront support read, write, or both for it’s caching?
Only read
Between which parties does CloudFront establish its two SSL connections when serving a request?
1: Viewer -> CloudFront
2: CloudFront -> Origin
(Both need valid public certificates!)
What’s SNI (in the context of CloudFront)?
Server Name Indication - a TLS extension allow a client to tell the server the desired hostname as part of the TLS handshake. This allows distribution of more than 1 SSL certificate via the same IP address.
When providing CloudFront content from an EC2 instance or On-Prem location (Custom Origin), can you use certificates generated by ACM, by a 3rd party, or both?
Only those of a 3rd party
What are the two high-level origin types that exist with CloudFront?
- S3 Origins
- Custom Origins
Which origin type of CloudFront do you need to use when a specific SSL Protocol (TLSv1, TLS1.2, etc.), Protocol Policy (HTTP Only, HTTPS Only, etc.) or HTTP/HTTPS Port shall be used for the Origin?
Custom Origin (and not S3 or any of the “Media” ones)
If an application requires query-string parameters in an URL, what needs to be considered when setting up CloudFront?
Query-string parameters aren’t forwarded to the application by default, so this needs to be activated.
Also, CloudFront should be configured with an allow-list of parameters where the parameter influences what’s being returned to the viewer (for instance “color” when viewing fashion photos).
Which Origin Type do you need to select when using Origin Access Identities (OAI) with CloudFront?
S3 Origin