← All projects

Lambda to ExpressJS on EC2 Auto Scaling

Migrated 40+ Node.js Lambda functions to ExpressJS services on EC2 Auto Scaling Groups to improve scalability and reduce cold-start latency.

AWS LambdaEC2Auto Scaling GroupsExpressJSNode.jsCloudWatch

Challenge

Several workloads running on AWS Lambda were experiencing cold-start latency that degraded user experience for latency-sensitive APIs.

Solution

I migrated 40+ Node.js Lambda functions to ExpressJS services running on EC2 Auto Scaling Groups. This kept the Node.js developer experience while moving away from cold-start issues for steady-state traffic.

What Changed

  • Runtime model: from per-invocation Lambda to long-running Express services fronted by ALB.
  • Scaling: Auto Scaling Groups handled capacity based on demand.
  • Observability: CloudWatch metrics and logs centralized the same way as the Lambda setup.

Outcome

The migration improved scalability, reduced cold-start latency, and gave the team more predictable infrastructure costs.