Serverless Express lets you run existing Express, Koa, Hapi, or similar Node.js application code on AWS Lambda behind API Gateway, ALB, Lambda@Edge, or VPC Lattice.
Overview
Serverless Express wraps a conventional Node.js web application so API Gateway and other AWS Lambda event sources can forward HTTP requests into frameworks you already use. You add a small Lambda handler that delegates to the library; the rest of the app can stay structured as a normal server-style project.
The library maps diverse event sources, including REST and HTTP API Gateway, ALB, Lambda@Edge, and VPC Lattice, into requests your framework understands. Optional settings cover binary responses, promise versus callback resolution, structured error responses during development, and routing extra AWS event types through configurable paths.
Install and configure it as an npm dependency within a Serverless Framework, SAM, or CDK project. Documentation covers minimal starter examples, async bootstrap before handling traffic, Azure Functions handlers, and custom event-source mappers such as DynamoDB-driven workflows.
Maintenance moved from AWS to Vendia and the package is published as @codegenie/serverless-express, continuing the earlier aws-serverless-express lineage for teams that want framework-style code on serverless compute.
Key features
- Express and other Node frameworks on Lambda
- API Gateway V1 and V2 support
- ALB and Lambda@Edge integration
- VPC Lattice V2 events
- Binary response encoding settings
- Optional SNS, SQS, and EventBridge routes
- Azure Functions handler helpers
- Custom event source mappers
Use cases
- Migrate Express APIs to Lambda
- Run Koa or Hapi on API Gateway
- Handle Lambda@Edge HTTP traffic
- Integrate SNS or SQS with HTTP routes