AWS Lambda@Edge is an extention of Amazon’s well known serverless compute services Lambda and CloudFront Functions. As of September 2024, Lambda@Edge is available at all 600+ Cloudfront Edge Locations globally.
Use Cases
- Serverless Functions
- Edge Computing
- Dynamic Content Delivery
- Request and Response Manipulation
- Bot Mitigation
- Origin Routing
Focus
Lambda@Edge is ideal for complex operations such as dynamic content generation, custom authentication, and advanced routing logic. The functions can access the public internet, allowing them to make HTTP requests to external services or APIs. This capability is essential for scenarios that require fetching data from outside the AWS environment or integrating with third-party services. Lambda@Edge can also access underlying filesystems, enabling more complex operations that require reading or writing files
Deployment
Lambda@Edge is Lambda functions in response to Cloudfront events.The Lambda function must be created in the us-east-1
US East (N. Virginia) Region, if code taken from bucket, bucket also needs to be in us-east-1
region After you create the function, you can add triggers in either the Lambda console or CloudFront console, or use Lambda and CloudFront API operations to set up your functions and triggers programmatically.