Lambda@Edge is a new AWS Lambda feature that allows you to run code at global AWS edge locations without provisioning or managing servers, to respond to end users at the lowest network latency. You just upload your Node.js code to AWS Lambda and configure your function to be triggered in response to Amazon CloudFront requests. Lambda@Edge handles deployment and routing to run your function at the AWS edge location closest to end users. You only pay for what you use- there is no charge when your function is not running. Lambda@Edge functions can be triggered by events from Amazon CloudFront, a content delivery network that accelerates delivery of your websites, APIs, or other web assets.

To get started with the Lambda@Edge Preview, please sign-up with a valid AWS Account ID to request access. If you’re selected, we will whitelist your AWS account to access this feature. You can then use the Lambda console to author your function using the new Edge-Node.js Lambda runtime and associate it with an event from your CloudFront distribution. Your Lambda function will then be ready to execute at each AWS edge location that you see end user requests at.

Note that during this preview period, your Lambda@Edge functions will have read/write access to the HTTP(S) headers of the request and response, to modify URL path to point to different objects, and to generate new HTTP(S) responses. For further details and limits, please see Lambda@Edge documentation here.


When should I use Lambda@Edge?

Lambda@Edge is optimized for use cases where all the information you need to make a decision is available at the CloudFront edge, within the function and the request. This means that use cases where you are looking to make decisions on how to serve content based on user characteristics (e.g., location, client device, etc.) can now be executed and served right from the edge without having to be routed back to a centralized server.

Do I need a CloudFront distribution to sign up for the Preview?

Yes, only CloudFront events can trigger Lambda@Edge functions. These triggers include: viewer request, origin request, viewer response, and origin response. Read more here on configuring your function.

Can I deploy my existing Lambda functions to the edge?

You can deploy existing Lambda functions to the edge if the function satisfies the Lambda@Edge service limits and has its runtime property field set to Edge-Node.js. Read more here on how to update your function properties.

Lambda@Edge Preview

Sign Up Today

Please respond to the following questions, and we will send you an email to let you know if you are approved and how to access this Public Preview.