In the second article of this three-part series about serverless, we overviewed benefits of the AWS Serverless Application Repository, a collection of publicly shared AWS Lambda applications. We also discussed what you should consider when creating your own serverless applications for both private and public use. In this final article, we will explore Lambda@Edge, a new Lambda-based processing model. We will also preview Amazon Aurora Serverless, the recently announced AWS service pushing serverless into the realm of databases.
Lambda@EdgeLambda@Edge is a new Lambda-based processing model that allows you to run functions in response to various Amazon CloudFront events—in AWS locations that are closer to the end user. It can modify CloudFront requests and responses and has many practical use cases, including:
- Creating new HTTP responses that redirect unauthenticated users to login pages.
- Inspecting cookies in order to rewrite URLs to different versions of websites for testing purposes.
- Inspecting headers and authorized tokens for access control before deciding whether to forward a request.
- Adding, deleting, and modifying headers.
- Rewriting URL paths to redirect users to different locations, depending on need.