CloudFront Functions on viewer-request can steer origin choice or rewrite the host from viewer-country or a custom header before the cache key is sealed: keep the public key on host plus path for hashed assets so a country rewrite does not multiply variants, and only fold the routing dimension into the key when each region must cache a distinct body. Prefer a small allow-list of origin hostnames, and keep Cookie and Authorization out of the public behaviour so session noise never fans out the edge store.
Ops prove-out after attaching the function and the origin group: request a warm path twice from an allowed country and expect MISS then HIT with Age climbing under the stable host-path key; flip the country header or a staging behaviour that mirrors another region and confirm the edge fills the intended origin without leaking cross-region objects into the same key. Most routing tickets after cutover are a leftover cache object keyed without the region dimension, or a function that mutates the path after the key was already computed.