You want CloudFront to honor different TTLs for individual pages while still enforcing the distribution’s minimum and maximum TTL settings. Which method will allow per-object TTL variation within those limits?
Choose an answer
Tap an option to check your answer.
Correct answer: Include a Cache-Control: max-age header on the origin response when returning content to CloudFront..
Why this is the answer
The correct answer is to include a Cache-Control: max-age header on the origin response. CloudFront respects this header from the origin, allowing you to specify a caching duration for individual objects. This max-age value will be honored as long as it falls within the minimum and maximum TTL settings configured for the CloudFront distribution. This provides granular control over object caching. Implementing a Lambda function to call CreateInvalidation is incorrect because invalidation removes objects from the cache immediately, it doesn't control their caching duration. Using Lambda@Edge to add a no-cache header in the Viewer Response would prevent caching entirely, which is not the goal. Having a CloudFront function add an Expires header in the Viewer Response is also incorrect; CloudFront primarily uses Cache-Control headers for origin-controlled caching, and modifying the viewer response doesn't influence how CloudFront caches from the origin.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed