Skip to main content

DVA-C02 practice question · Troubleshooting and Optimization

Users of a website served through Amazon CloudFront keep receiving outdated versions of pages for days after updates are…

Users of a website served through Amazon CloudFront keep receiving outdated versions of pages for days after updates are published. The cache behavior's minimum TTL is 0, and the team never changed the maximum or default TTL. What is the most likely cause?

  • AThe origin returns a Cache-Control max-age header with a long value, and CloudFront caches objects for that duration, up to the maximum TTL
  • BA minimum TTL of 0 makes CloudFront ignore origin caching headers and keep each object until its edge location evicts it
  • CViewer browsers send Cache-Control headers in their requests, which instruct CloudFront to keep serving its existing cached copies
  • DS3 Versioning on the origin bucket causes CloudFront to keep returning earlier object versions until versioning is suspended
Show the answer and explanation

Correct answer: A) The origin returns a Cache-Control max-age header with a long value, and CloudFront caches objects for that duration, up to the maximum TTL

CloudFront honors origin Cache-Control max-age and Expires headers within the cache behavior's minimum and maximum TTL. A long max-age from the origin can keep stale content cached even if no one changed the TTL settings.

Why each option is right or wrong

  • A) Correct. When the minimum TTL is 0 and the origin sends Cache-Control max-age, CloudFront caches the object for the lesser of max-age and the maximum TTL. A long max-age from the origin can therefore keep stale copies at edge locations for days.
  • B) Incorrect. With a minimum TTL of 0, CloudFront follows origin caching headers, limited only by the maximum TTL. If the origin sent no caching headers, the default TTL would apply instead.
  • C) Incorrect. CloudFront ignores Cache-Control and Pragma headers in viewer requests. Those headers cannot force CloudFront to keep or refresh a cached object.
  • D) Incorrect. S3 Versioning keeps prior object versions in the bucket. It does not affect how long CloudFront caches a response, which depends on the TTL settings and the origin's caching headers.
Exam domain
Troubleshooting and Optimization · 18% of DVA-C02
Question type
Multiple choice (one answer)

Practise the full DVA-C02 exam

This question is one of a small free sample from the CertRidge DVA-C02 bank. Full practice exams match the real exam's length, time limit and domain weights, explain every option, and Review Mode re-drills the questions you miss.

Original question written from the official exam guide. Not affiliated with AWS; never copied from the real exam.

Worth reading: DVA-C02 cheat sheet, Lambda, DynamoDB, API Gateway, IAM and Cognito, messaging, CI/CD and X-Ray in tables, plus what DVA-C03 changes.