CloudFront

Amazon CloudFront is a Content Delivery Network that makes use of Amazon's points of presence as edge locations to perform regional edge caching of content. It can be used to serve both RTMP and web content.

Concepts

  • Origins contain the source content, and are where requests for content not present in the cache are directed.
  • Distributions are individual caches.
  • Origin Access Identities allow you to authenticate with origins.

Operation

Only responses to GET, HEAD, and OPTIONS requests are cached, though CloudFront distributions can be configured to accept the following HTTP methods:

  • GET, and HEAD.
  • GET, HEAD, and OPTIONS.
  • GET, HEAD, OPTIONS, PUT, PATCH, POST, and DELETE.

CloudFront distributions support long-lived WebSocket connections without configuration.

Lambda@Edge

Lambda@Edge allows you to execute dynamic requests on Lambda closer to your users, increasing performance.

S3 as origin

An S3 bucket can be used as an origin for cheaply serving static files.

Logs

Two types:

Note that log messages are not necessarily in chronological order.

The full list of fields is in the developer guide, but some interesting highlights:

  • time-taken tracks the time from the server's receipt of the client's request until the last byte of the response is written to the output queue.

Backlinks