AWS Serverless Application Model (SAM) helps you deploy serverless resources on the cloud using a simple template. The SAM template builds on the CloudFormation template. However, it deploys serverless services in fewer lines of code.
In this Cloud Lab, you’ll begin by understanding the SAM template and command line interface (CLI) with a Hello World example and get hands-on experience with SAM. Next, you’ll build and deploy a full stack serverless web application using SAM. You’ll set up a simple table to store data. Then, you’ll set up Lambda functions to perform CRUD operations on the database. Next, you’ll set up an API Gateway to create a REST API and route your HTTP requests to the Lambda functions. Finally, you’ll learn to host the applications frontend on an S3 bucket and access the website by enabling static website hosting of an S3 bucket.
By the end of this Cloud Lab, you’ll build and deploy your applications using a SAM template and get familiar with the advantages of the SAM template while building serverless workloads on AWS.
The illustration below shows the infrastructure that you’ll build in this Cloud Lab: