image
hands-on labDeveloping a REST API With the AWS SAM CLI (JavaScript)
Beginner
1h
235
5/5
Get guided in a real environmentPractice with a step-by-step scenario in a real, provisioned environment.
Learn and validateUse validations to check your solutions every step of the way.
See resultsTrack your knowledge and monitor your progress.
Lab steps
Setting up the AWS SAM CLI
Defining a REST API Backed by Lambda and DynamoDB (JavaScript)
Lab description

The AWS Serverless Application Model (SAM) supplies built-in best practices for deploying your serverless applications. A REST API built with AWS SAM can be configured using shorthand syntax to express event source mappings, database relationships, and function declarations.

In this lab, you will use the AWS SAM CLI to develop a simple REST API backed by a Lambda function and a DynamoDB table. The lab will cover the built-in conventions and default values that are present in a simple SAM application.

This lab uses the NodeJS (JavaScript) runtime to develop the Lambda function referenced by the REST API.

Learning Objectives

Upon completion of this beginner-level lab, you will be able to:

  • Use the AWS SAM CLI to define the Serverless API, function, and table resources
  • Deploy a REST API backed by AWS Lambda and DynamoDB

Intended Audience

  • Cloud Architects
  • Software Engineers

Prerequisites

Familiarity with the following will be beneficial but is not required:

  • AWS Serverless Application Model (SAM)
  • AWS Lambda
  • Amazon API Gateway
  • Amazon DynamoDB

The following content can be used to fulfill the prerequisite:

Updates

March 9th, 2023 - Enabled autosave in the lab's browser IDE

Environment before
environment before preview
Environment after
environment after preview
About the author
Avatar
Jun Fritz
Cloud Labs Developer
Students
24742
Labs
79
Learning Paths
3

Jun is a Cloud Labs Developer with previous experience as a Software Engineer and Cloud Developer. He holds the AWS Certified Solutions Architect and DevOps Engineer Professional certifications. He also holds the AWS Certified Solutions Architect, Developer, and SysOps Administrator Associate certifications. 

Jun is focused on giving back to the growing cloud community by sharing his knowledge and experience with students and creating engaging content. 

Covered topics