A CloudFront application must normalize tracking parameters before cache lookup with minimal latency, and add a header obtained from an external service only when forwarding cache misses to the origin. Which design meets these requirements?
Show the answer
Correct answerC. Use CloudFront Functions at viewer request for normalization and Lambda@Edge at origin request for external header retrieval.
AWhy not this: Viewer-request execution retrieves the external header on cache hits as well as misses, adding unnecessary latency.
BWhy not this: Origin-request processing occurs after cache lookup, so normalization there cannot consolidate the current request's cache key.
CWhy this is right: Viewer-request normalization precedes cache lookup, while Lambda@Edge can retrieve the header when an origin request is needed.
DWhy not this: CloudFront Functions do not support origin-request triggers or external network calls.
CloudFront Functions can normalize requests before cache lookup with low overhead; Lambda@Edge origin-request functions can make network calls only on origin-bound requests. Doing both at origin request normalizes too late to determine the cache lookup key.