Compute
AWS Lambda@Edge
AWS Lambda@Edge runs supported Lambda functions at CloudFront edge locations in response to viewer or origin events. It can enforce lightweight request handling near users but is not a location for invoking large models.
Key points
- Functions are replicated from the required home Region to edge locations
- Runtime, deployment, networking, and execution limits differ from regional Lambda
- Viewer and origin triggers expose different request and response stages
When to use it
- Attach tenant routing headers before a chat request reaches its origin
- Normalize or reject malformed edge requests for an AI web application
Exam tips
- Use CloudFront Functions for simpler ultra-low-latency JavaScript and Lambda@Edge when richer edge logic is necessary
- Never place secrets or latency-heavy FM calls in an edge handler