Take serverless to your users

Customize your content delivery while reducing load on your origin

AWS Cloud
Try Lambda@Edge

With Lambda@Edge you can easily run your code across AWS locations globally, allowing you to respond to your end users at the lowest latency. Your code can be triggered by Amazon CloudFront events, such as requests for content to or from origin servers and viewers. Upload your Node.js code to AWS Lambda and Lambda takes care of everything required to replicate, route and scale your code with high availability at an AWS location close to your end user. You only pay for the compute time you consume - there is no charge when your code is not running.

Lambda@Edge Video
Lambda@Edge Overview and Demos
Lambda@Edge Deep Dive


Lambda@Edge runs your code at an AWS location close to your end user, making it easier to deliver richer, more personalized content to your end users with lower latency.

Continuous Scaling

Lambda@Edge automatically scales your application by running code in response to each trigger by Amazon CloudFront events. Your code runs in parallel and processes each trigger individually, scaling precisely with the size of the workload.

Reduce Origin Load

Lambda@Edge automatically runs your code without requiring you to provision or manage servers across different locations. Just write your Node.js code, upload it to AWS Lambda, and your code will run at an AWS location close to your end user.

Subsecond Metering

With Lambda@Edge, you are charged for every 50ms your code executes and the number of times your code is triggered. You don't pay anything when your code isn't running.

Highly Personalized Websites

Lambda@Edge lets you add unique content delivery functionality to your websites (e.g. news, weather, sports sites). You can deliver unique content based on where your end user is located and the type of device used to access the website. Custom Device Detection/Grouping lets you send back different objects to end users accessing the website based on the user-agent.

Response Generation at Viewer Request

You can generate an HTTP response to end user requests arriving across AWS locations globally. For instance, you can redirect unauthenticated users to a login page that is created on-demand. You can also generate customized error pages or static webpages directly from the AWS location closest to your end user.

URL Rewrites

You can rewrite the URL end users see to match the origin directory structure before forwarding. This helps you build seamless experiences for end viewers without exposing your team structure or exposing how you manage content internally.

Access Control at the Edge

Developers can write a Lambda function that utilizes HTTP cookies as a way to control access to content once a user is authenticated for the first time, allowing you to authenticate future requests at the edge.

Remote Network Calls

With Lambda@Edge, you can make calls to additional services across the internet to access additional resources to tailor content or make decisions on viewer and origin facing events.

A/B Testing

Lambda@Edge allows you to test different versions of your homepage (e.g. e-commerce sites) with real end users without the need for redirects or changing your website URL.

Content-Based Dynamic Origin Selection

You can dynamically route requests to different origin servers based on request attributes such as viewer location, viewer device type, HTTP headers, URL path, query string or cookies. For instance, in a geographically distributed multiple origin setup, your lambda functions at the edge locations, can inspect the request attributes (cookies, headers, etc.) to route your viewers to the most optimal origin, based on proximity to the viewer, data locality, user session information, A/B testing treatment, etc.

Sign up for an AWS account

Sign up for an AWS account


                          Learn with our Documentation                                                

Try Lambda@Edge
Start Building with AWS

Start Building with AWS