Migrate your Node.js application to serverless using AWS Lambda

A step-by-step tutorial where we’ll learn how to convert your Node.js project to AWS Lambda and start saving money!

Gonzalo Fernandez Plaza
6 min readMar 21, 2023

AWS Lambda is the main serverless AWS computing service. With AWS Lambda, you don’t have to create EC2 instances, you don’t have to provide any server, and you don’t care about scaling; you are just focused on your code.

Make your Node.js app serverless to start saving money!
Make your Node.js app serverless to start saving money!

One of the main reasons for using AWS Lambda is that you’ll only pay for what you use. If you are developing a proof of concept and don’t have many users, this is extremely useful! I used to pay $10 per month per proof of concept, and right now, it’s free for me! Also, the AWS Lambda free tier is amazing; it includes one million free requests and 400,000 GB-seconds of computing time per month! And if you go over it, you will only pay $0.20 per 1M requests (apart from other factors like the duration of the request).

AWS Lambda Pricing. One of the cheapest AWS services.
AWS Lambda Pricing. One of the cheapest AWS services.

The only limitation? AWS Lambda functions may run up to 15 minutes per execution, so you shouldn’t use this service if you have a really heavy endpoint. This shouldn’t be your case if you are developing…

--

--

Gonzalo Fernandez Plaza

Computer Science Engineer & Tech Lead 🖥️. Publishing AWS & Snowflake ❄️ courses & exams. https://www.fullcertified.com