- Lambda functions written in Node.js or Python, deployed at CloudFront edge locations.
- Designed for deeper request/response customization across both viewer and origin events.
- Auto-scales to handle thousands of requests per second with global replication.
Supported CloudFront Lifecycle Events
- Viewer Request – after CloudFront receives the request from the client.
- Origin Request – before CloudFront sends the request to the origin.
- Origin Response – after CloudFront receives the response from the origin.
- Viewer Response – before CloudFront sends the response to the client.
Deployment Model
- Functions are authored in the us-east-1 region.
- CloudFront replicates the code to all edge locations automatically.
Use Lambda@Edge for advanced logic that requires access to both viewer and origin request/response phases.