aws-serverless-express is a NodeJS-based API framework used for mimicking the routing capabilities of ExpressJS framework inside Lambda functions. This article aims to explain the pros & cons of using this library. Well if I manage to identify your probable identity, you came to the right place as this article intends to showcase the good and bad things about AWS serverless express framework from an architect’s point of view.
Is aws-serverless-express good or bad for your application’s migration use-case?
aws-serverless-express is a NodeJS-based API framework used for mimicking the routing capabilities of ExpressJS framework inside Lambda functions. This article aims to explain the pros & cons of using this library.
You are probably here because:
Well if I manage to identify your probable identity, you came to the right place as this article intends to showcase the good and bad things about AWS serverless express framework from an architect’s point of view.
Knowing the differences between lambda-based and classic express helps in assessing the value that they offer to your architecture
In order for us to give a fair assessment of the pros & cons of aws-serverless-express, we have to understand the critical differences between the classic and lambda-based express frameworks.
Understanding differences between the frameworks’ hosting environments will help you get a better understanding of the premises mentioned later in the article
Hosting Environments
aws-serverless-express is meant to run inside Lambda Functions, while the classic ExpressJS is expected to run inside virtual machines or Docker containers. This means that the serverless-based express is not capable of retaining any form of state due to the random execution location of Lambda-functions between a region’s availability zones.
This also means that the lambda-based framework can be cheaper and more scalable and it offers you more efficiency compared to the traditional one.
Application state plays a critical role on authenticating and authorising HTTP request on APIs.
State Management
aws-serverless-express does not manage state because its meant to run across different underlying lambda functions. This means that any form of attempt to store session-related state inside the API instance will cause failures as lambda functions tend to evaporate after 15 minutes of idle compute time.
aws nodejs expressjs programming aws-lambda amazon web services
What is AWS Lambda? Introduction to AWS Lambda on Amazon Web Services. Amazon Web Services (AWS) is the world’s most comprehensive and broadly adopted cloud platform, offering over 175 fully-featured services from data centers globally. Millions of customers—including the fastest-growing startups, largest enterprises, and leading government agencies—are using AWS to lower costs, become more agile, and innovate faster.
In this article, we’ll discuss the procedure to build a Lambda function that will send an email to the specified recipient from the specified sender using Amazon Simple Email Service (SES). In this project, we’ll do everything in AWS console.
In this article, I will show you how to invoke a lambda function from another lambda function.
How to Build and Manage Infrastructure as Code with Amazon Web Services - AWS CloudFormation, AWS CloudWatch and Amazon EC2
An Introduction to Infrastructures for WEB projects in AWS - Let's review a particular project in detail and the cost of infrastructure maintenance. And so, we have an internal WEB application that consists of a static website on React, a backend on Go, and a database DynamoDB. All code is stored on Github and for CI/CD we use Github Actions. The infrastructure code is defined in Terraform.