SOA-C02 Question 282
Select 4A company is using Amazon CloudFront to distribute their dynamic and static web content. Users are reporting that they are seeing outdated content when accessing the website. Upon investigation, you notice that the content cached in CloudFront is not updating as expected after changes are made to the origin. As a SysOps Administrator, which actions should you take to resolve this issue?
- A
Invalidate the specific objects in the CloudFront cache using an invalidation request.
- B
Configure the origin server to include Cache-Control headers with appropriate max-age settings.
- C
Enable CloudFront's Origin Shield to reduce the latency of cache updates.
- D
Verify the behavior settings in the CloudFront distribution and ensure 'Object Caching' is set to 'Use Origin Cache Headers'.
- E
Create a cache policy in CloudFront to set a shorter Time-to-Live (TTL) for the cached objects.
Show answer and explanation
Correct answers: A, B, D, E
Explanation
Outdated content in CloudFront is typically caused by improper caching configurations or stale objects in the cache. To resolve the issue, you can invalidate specific objects to immediately update them, configure Cache-Control headers on the origin to manage cache behavior, and verify that CloudFront is using these headers. Additionally, setting a shorter TTL in a cache policy ensures that content is refreshed more frequently. Origin Shield, while useful for reducing origin load and latency, does not affect cache updates and is not relevant to this specific problem.
- A. Correct.
Invalidating specific objects in the CloudFront cache forces CloudFront to fetch updated content from the origin, resolving the issue of outdated content.
- B. Correct.
Setting appropriate Cache-Control headers on the origin server ensures that CloudFront respects the caching duration defined by the origin, preventing outdated content from being served.
- C. Incorrect.
Enabling Origin Shield reduces latency by adding an extra caching layer but does not directly address issues related to outdated content in the CloudFront cache.
- D. Correct.
Ensuring that CloudFront is configured to 'Use Origin Cache Headers' ensures that CloudFront respects the cache settings provided by the origin, which is critical for avoiding outdated content.
- E. Correct.
Creating a cache policy with a shorter TTL in CloudFront ensures that cached content expires sooner, prompting CloudFront to fetch updated content more frequently.