CLOUD-DEPLOYMENT-AND-OPERATIONS practice question 6 of 15
(A company configures the CloudFront caching TTL to the following settings: Min: 0, Max: 172800. An administrator updates the Cache-Control setting to 432000. However, objects are only cached for 48 hours. What is required to ensure objects are cached for up to 120 hours?)
Full set: 67 questionsThe AWS CloudFront Maximum TTL setting defines the longest amount of time an object will be cached, regardless of the caching headers sent by the origin server. In this scenario, the origin's Cache-Control header requests a 120-hour (432000 seconds) cache duration. However, the CloudFront distribution's Maximum TTL is configured to 48 hours (172800 seconds). CloudFront honors the lower of these two values. To allow objects to be cached for the full 120 hours specified by the origin, the Maximum TTL in the CloudFront cache behavior must be increased to 432000 seconds.
B. Configure the Min setting for 432000: The Minimum TTL is used when the origin does not provide caching headers or when the headers specify a shorter duration. It does not limit the maximum cache time.
C. Configure the expiration setting for 172800: This value (48 hours) is the source of the current limitation. Setting an "expiration" to this value would not resolve the issue of needing a longer cache duration.
D. Configure the Cache-Control setting for 172800: The Cache-Control header is set at the origin. Lowering it to 172800 seconds would shorten the requested cache duration, which is the opposite of the desired outcome.
1. AWS CloudFront Developer Guide: In the section "Managing how long content stays in the cache (expiration)," the documentation states: "If your origin adds a Cache-Control max-age or s-maxage directive or an Expires header field with a value that is greater than the Maximum TTL, CloudFront caches the object for the Maximum TTL duration instead of the value in the header field." This confirms that the Maximum TTL setting overrides a longer origin Cache-Control header.
Source: AWS CloudFront Developer Guide, "Settings for Caching," subsection "Maximum TTL."
2. AWS CloudFront Developer Guide: The guide further clarifies the order of precedence: "CloudFront uses the following logic to determine how long to cache an object... If the value of the origin’s Cache-Control max-age or s-maxage directive... is greater than the value of the cache behavior’s Maximum TTL, CloudFront uses the Maximum TTL."
Source: AWS CloudFront Developer Guide, "Managing how long content stays in the cache (expiration)," subsection "Object caching."
Keep practicing
Take the free CLOUD-DEPLOYMENT-AND-OPERATIONS practice test
Ten exam-style questions with answers and explanations, plus the exam facts and study guides.
More questions
Other CLOUD-DEPLOYMENT-AND-OPERATIONS practice questions
- Question 1(What is the role of AWS Trusted Advisor?)
- Question 2(Which action must be used to create a metric filter in the Amazon CloudWatch console?)
- Question 3(Which CloudWatch metric filter includes log events with the word ERROR but excludes log …
- Question 4(Media files are stored in an S3 bucket in region A. Demand for the files from region B h…
- Question 5(A company is using Route 53 for Domain Name System (DNS) hosting. The company requires a…
- Question 7(Which AWS service is used to provide remote workers with secure access to AWS resources?)
