Going Serverless: Lambda@Edge and Amazon Aurora Serverless

Learn about Lambda@Edge, a new Lambda-based processing model and take a peek into Amazon Aurora Serverless.
Share This Post

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@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.

To use Lambda@Edge, simply write a piece of code (AWS offers several examples for Lambda@Edge functions) and set up the trigger to be a specific CloudFront event. After the S3 Lambda trigger is set, your function will be replicated to multiple AWS edge locations.

These locations are part of the AWS global infrastructure, which is used to provide low latency connectivity by making static content accessible from the geographical location closest to the request.

                                                 Global distribution of a Lambda@Edge function

When working with Lambda@Edge, there are multiple limitations to consider, such as the default limits for both AWS Lambda and CloudFront, as well as additional limits specific to Lambda@Edge. These additional limits include soft limits regarding the number of triggers, concurrent executions, or requests per second; and hard limits that differ by event type.  

AWS Serverless: Moving Forward

For a long time, serverless computing revolved primarily around Lambda functions. This changed at AWS re:Invent 2017, when Amazon announced Aurora Serverless, a new AWS service that applies the concept of event-driven cloud computing to databases.

Amazon Aurora Serverless

Amazon Aurora Serverless is a service based on Amazon Aurora, a MySQL and PostgreSQL compatible database built for the cloud. It allows you to start up, shut down, and scale up or down your database compute capacity based on your application’s needs—without provisioning or managing servers yourself. This is achieved by separating compute processing from storage.

When using Aurora Serverless, simply create a database endpoint and start issuing queries. Unlike with standard databases, your endpoint is only a proxy that routes queries to a fleet of “warm” scalable database servers. This allows you to scale up quickly when needed, as new resources are online within seconds. It also allows you to scale down completely when there are no workloads to be processed. When this happens, you only pay for storage capacity. Databases require large amounts of processing power and produce significant costs, so this makes Aurora Serverless an incredibly valuable product.

Aurora Serverless is also a great choice for use cases that are unpredictable or intermittent, such as reporting workloads, sales events like Black Friday, online gaming applications and software, and development and testing purposes. You can sign up for a free preview here.

Just the beginning of the serverless revolution

Although the concept of serverless is still somewhat new, its benefits are substantial. AWS Lambda introduced possibilities that were previously unthinkable, allowing us to focus completely on the product and speed up delivery time, rather than provisioning and maintaining infrastructure. In doing so, it completely changed the way we look at the cloud.

The recent announcement of Amazon Aurora Serverless showed us that AWS Lambda was just the beginning of the serverless revolution. With Aurora Serverless, the benefits of serverless are applied to databases, marking a huge step forward and inspiring us to think about what is yet to come.

Are you looking for an AWS Data Protection solution? Try N2WS Backup & Recovery (CPM) for FREE!

Read Also

Next step

Protect serverless databases on AWS

Allowed us to save over $1 million in the management of AWS EBS snapshots...

N2WS vs AWS Backup

Why chose N2WS over AWS Backup? Find out the critical differences here.

N2WS in comparison to AWS Backup, offers a single console to manage backups across accounts or clouds. Here is a stylized screenshot of the N2WS dashboard.

Try N2WS for Free