Cost-Optimized Architecture Design

A CloudFront distribution caches product images using all query strings, including a unique analytics identifier and an image version; only the version changes the image. The origin needs both parameters on cache misses, and image TTLs cannot increase. Which change BEST reduces origin requests?

Show the answer

Correct answerC. Cache by version only and forward analytics through an origin request policy.

AWhy not this: Removing version can mix image versions, and removing analytics violates the origin's parameter requirement.

BWhy not this: Unique analytics identifiers fragment the cache, and excluding version can cause the wrong image version to be served.

CWhy this is right: The version distinguishes image content, while the origin request policy forwards analytics without fragmenting the cache.

DWhy not this: Unique analytics identifiers still create distinct cache keys, limiting the benefit of an additional cache layer.

Including only the image version in the cache key allows requests with different analytics identifiers to share cached images; an origin request policy preserves analytics on misses. Origin Shield does not eliminate cache fragmentation caused by unique cache keys.