There are many articles on serverless with explained ideas, benefits and so on. Serverless is great, but articles sometimes sound more like a TV commercial.

Sometimes you just want to try and create a working example.

Serverless is like ice cream. It’s nice to talk about it, but much better to try out.

The goal is to show how to create a serverless Node.js app with DynamoDB that stores and retrieves data. Since ice creams are already mentioned, this service will be for an ice cream shop. You will save and show ice creams.

Let’s first see what do you need:

  • a serverless host — where you’re going to deploy and execute your code and connect to a database. We’re going with AWS, as the most mature platform at the moment. AWS has a serverless container service called Lambda. Because Lambda is just a compute service without “outside access”, we also need an “access point” or a “front door” service — AWS API Gateway.
  • a development and deployment tool / library — helps with code setup and deployment. Because serverless is still new and these tools make your life easier. Choosing a library influences the way you build your services. We’re going to use Claudia.js - a development and deployment tool with helpful examples and a good community. It will deploy your service to your AWS serverless container (Lambda) and create an API Gateway for it.
  • a service — your service that receives a request, saves an ice cream to a database or shows all ice creams you saved.
  • a database — a storage to which you connect your service to store ice creams. We’re going with DynamoDB — AWS noSQL database.

The overview of your service infrastructure

#serverless #dynamodb #node.js

How To Create a Serverless Node.js App with DynamoDB
9.25 GEEK