How to Create a Serverless NodeJS REST API

A guide for creating a REST API with the Serverless Framework and DynamoDB

Matthew Brown
The Startup

--

Created by the author in Canva

Interested in how to quickly build manageable serverless REST APIs? In this article, I will be demonstrating how to accomplish this for NodeJS REST APIs with the Serverless Framework. For this demonstration, we will be building a simple API that manages the users for our demonstration application. To follow along you should have the pre-requisites:

  • A good grasp of JavaScript fundamentals
  • An AWS account and developer credentials
  • Node and npm installed locally

Serverless

I think at this point that serverless computing has been around long enough that we are all well aware that serverless doesn’t mean there aren’t any servers. It just means you don’t have to worry about managing and maintaining your own servers. And if you’ve been unfortunate enough to have to do that then you know how painful that can be at times.

The pricing model is also good for new or lightly used applications because you are charged by actual use rather than for reserved capacity. So let’s say your API services 1000 requests a month. You are only going to be charged for the computing time it took to run those requests…

--

--

Matthew Brown
The Startup

I am a senior software engineer. My passions include software development, anything technology related, and cars.