Create & Deploy a REST API Backed by a Node.js 12 Lambda Function using AWS Serverless Application Model (AWS SAM)

This article describes the steps involved in creating a simple hello world AWS SAM application in Node.js 12 & deploying it to AWS using the AWS toolkit in VS code.

Step 1 — Create SAM App

Wait for the app to create. When it’s done, VS code will open template.yaml.

Step 2 — Deploy SAM App

Starting SAM Application deployment...
Building SAM Application...
Packaging SAM Application to S3 Bucket: my-s3-bucket-in-virginia
Deploying SAM Application to CloudFormation Stack: sam-app-stack
Successfully deployed SAM Application to CloudFormation Stack: sam-app-stack

Step 3 — Test API