SOA-C03 · Question #157
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
The correct answer is A. Add a Cache-Control header field with max-age=0 to the S3 object.. With the Managed-CachingDisabled policy, CloudFront is configured to minimize edge caching, so the remaining caching behavior users experience often comes from browser (client-side) caching. If users refresh and still see old content, it typically indicates the browser is allowed
Question
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?
Options
- AAdd a Cache-Control header field with max-age=0 to the S3 object.
- BChange the CloudFront cache policy to Managed-CachingOptimized.
- CDisable bucket versioning in the S3 bucket configuration.
- DEnable content compression in the CloudFront configuration.
How the community answered
(28 responses)- A82% (23)
- B4% (1)
- C4% (1)
- D11% (3)
Explanation
With the Managed-CachingDisabled policy, CloudFront is configured to minimize edge caching, so the remaining caching behavior users experience often comes from browser (client-side) caching. If users refresh and still see old content, it typically indicates the browser is allowed to reuse a cached copy without revalidating. The correct fix is to control client caching using HTTP response headers on the S3 object. Adding a Cache-Control: max-age=0 header instructs browsers that the object becomes stale immediately and should be revalidated on subsequent requests (often resulting in conditional requests using If-Modified-Since or ETag behavior). This preserves correctness--users will fetch or revalidate the latest file--without requiring heavier operational actions like frequent CloudFront invalidations or changing to an optimized caching policy that may increase edge caching.
Topics
Community Discussion
No community discussion yet for this question.