Revisit Amazon Web Services re:Invent 2024’s biggest moments and watch keynotes and innovation talks on demand

 ✕

What does this Amazon Web Services Solution do?

Lambda@Edge is a feature of Amazon CloudFront that lets you run code closer to users of your application, which improves performance and reduces latency. With Lambda@Edge, you don't have to provision or manage infrastructure in multiple locations around the world. You pay only for the compute time you consume - there is no charge when your code is not running. 

This solution offers a collection of Lambda@Edge applications, covering most common Lambda@Edge user scenarios. All the Lambda@Edge applications in this solution can be directly deployed into Amazon Web Services console. 

The Lambda@Edge collection is part of "CloudFront-Extentions" GitHub project. Anyone in the open source community is welcomed to contribute to the project.

Amazon Web Services Solution Overview

In the collection, you can find the lambda@Edge for the following scenarios:
  • Authentication, e.g. authenticate with Amazon Cognito, add security headers into request headers.
  • Validation, e.g. perform MD5 checksum and determine when return to the origin.URL Rewrite, e.g. rewrite URL according to the cookie information.
  • URL Redirect, e.g. return related content according to the device type.
  • Override Request, e.g. modify the response status code.
  • Override Response, e.g. standardize the query.
  • Origin Selection, e.g. forward request to the nearest CDN PoP according to the current geolocation.
  • Personalize Content, e.g. resize images.
  • Security,  e.g. hotlinking protection.
 
Please find more details in the roadmap of this solution in Github.

Solution Architecture and Description

All the Lambda@Edge applications in this solution are published publicly on Amazon Web Services Serverless Application Repository (SAR). 

SAR is a managed repository for serverless applications. In the repository, you can find and deploy the pre-built Lambda@Edge applications released through this solution. 

To find the Lambda@Edge applications, it takes two steps: 1. Check box "Show apps that create custom IAM roles or resource policies". 2. Search keywords the "aws-cloudfront-extensions". 

In the application detail page, you can "1-click" deploy your desired Lambda@Edge application into your Amazon Web Services account. After the deployment, you just need to complete a simple setup, for example, setting CloudFront Trigger, to use the Lambda@Edge function. Please see the deployment guide for more details.

Lambda@Edge Collection

Version 1.0.0
Last updated: 03/2021
Author: Amazon Web Services 

Source code 

Features

One-stop Lambda@Edge best practices

You can find the code implementation of most common Lambda@Edge use cases. The Lambda@Edge collection is vetted by Amazon Web Services.

Easy one-click deployment

You can easily deploy Lambda@Edge applications into your Amazon Web Services console with just "1-click" from Serverless Application Repository. To use it with your CloudFront, you only need to complete a few simple steps such as setting CloudFront triggers. Please refer to the deployment guide for more details.

Open Source and Customization

It is an open-source project. You can use the Lambda@Edge applications for free. In the case you have different use cases, you can take the source code as reference to implement your own Lambda@Edge functions.
Explore all Amazon Web Services Solutions

Browse our portfolio of Amazon Web Services-built solutions to common architectural problems.

Learn more 
Find a Partner

Find Amazon Web Services certified consulting and technology partners to help you get started.

Learn more 
Start building in the console

Sign-up and start exploring our services.

Get started