A CloudFront distribution has a default TTL of 86400 seconds and a minimum TTL of 0. The origin sends Cache-Control: max-age=300. For how long does CloudFront cache the object?
A86400 seconds, because the distribution default takes precedence always
B0 seconds, because the minimum TTL allows revalidation on every request
C300 seconds, but only when the viewer sends no conditional headers
D300 seconds, because the origin header overrides the default TTL valueCorrect answer
Correct answer
D. 300 seconds, because the origin header overrides the default TTL value
CloudFront honours the origin's Cache-Control max-age when it falls between the configured minimum and default TTL, so 300 seconds wins here. The default TTL applies only when the origin sends no cache directives at all, and the minimum TTL raises shorter max-age values up to the floor. The maximum TTL caps longer directives, which is how you stop an origin from pinning stale content for a year.