CloudFront is an AWS CDN service that has many capabilities
- An origin is where CloudFront retrieves the requested resource upon a cache miss. There can be multiple origins per CloudFront distribution. Each origin corresponds with at least one cache behavior.
- A cache behavior in a distribution help determine how to respond to requests (i.e. which origin to use), what request types and paths to cache, and how to determine the cache key (i.e. which request headers and cookies to consider as a cache key).
- The cache policy of a cache behaviorto-do
- The origin request policy of a cache behavior determines how to make a request to the origin. This involves which cookies, headers, and query string parameters to send to the origin. Origins like S3 won’t need any of them, whereas others like ALB may want some or all three.