First we need to install
Let's create a folder:
$ mkdir node-aws
Go into that folder and run:
$ cd node-aws $ serverless
Now is going to appear some questions after you choosed the AWS - Node.js - HTTP API:
? What do you want to call this project? **aws-node-api** ✔ Project successfully created in aws-node-api folder ? What org do you want to add this service to? **[Skip]** ? Do you want to deploy now? **No**
Open your folder that was created and now we can look at:
When we use
serverless deploy our application is going to start the process on AWS, and we go there and see the queue on CloudFormation. You can use search tool and find all the services below.
It organize a queue of services processing to deploy our service. when we run
serverless deploy there is a folder
.serverless with Cloudformation informations do deploy. AWS CloudFormation has a template for this Serverless application. Look at below the events created by that service.
User management. You can verify yours users.
The API Gateway service helps us to create an excellent pattern to access our API. It show us all the routes of the system and here we can add Authorization, CORS configurations and create new routes.
When we access the Lambda service we can see the API Gateway in a pipe clicking on Functions -> choose the function that we created -> Function overview:
Monitoring the API with a couple metrics
At the final we have the URL to access our API: https://h5c2vw466m.execute-api.us-east-1.amazonaws.com/
You can find the URL looking for API Gateway service in search tool and click on the project name that we created.