AWS Certified SysOps Administrator – Associate — Question 458
A company hosts a static website on Amazon S3. An Amazon CloudFront distribution presents this site to global users. The company uses the Managed-
CachingDisabled CloudFront cache policy. The company's developers confirm that they frequently update a file in Amazon S3 with new information.
Users report that the website presents correct information when the website first loads the file. However, the users' browsers do not retrieve the updated file after a refresh.
What should a SysOps administrator recommend to fix this issue?
Answer options
- A. Add a Cache-Control header field with max-age=0 to the S3 object.
- B. Change the CloudFront cache policy to Managed-CachingOptimized.
- C. Disable bucket versioning in the S3 bucket configuration.
- D. Enable content compression in the CloudFront configuration.
Correct answer: A
Explanation
Because the CloudFront distribution uses the Managed-CachingDisabled policy, the caching issue occurs at the web browser level rather than the CDN edge. Adding a Cache-Control header with max-age=0 to the Amazon S3 object instructs the users' browsers to always validate and fetch the latest version from the origin upon refresh. Other options like changing the CloudFront cache policy, disabling S3 bucket versioning, or enabling compression do not address browser-side caching behavior.