Building Robust Modular Serverless Architecture with AWS SAM Templates

Priyanshu Bhatt
9 min readJun 1, 2024

Serverless is a cloud computing execution model where the cloud provider dynamically manages the allocation and provisioning of servers. In a Serverless model, the user can run code without worrying about the underlying infrastructure. The term “serverless” can be somewhat misleading because servers are still used, but they are abstracted away from the developer.

Why use SAM Templates

AWS SAM (Serverless Application Model) is an open-source framework provided by AWS to define serverless applications. It extends AWS CloudFormation to provide a simplified syntax for deploying serverless resources like Lambda functions, API Gateway APIs, DynamoDB tables, and more.

Key Features of AWS SAM:

- Simplified Syntax: SAM templates simplify the definition of serverless resources.

- Built-In Best Practices: SAM includes built-in best practices for security, performance, and scalability.

- Local Development and Testing: The SAM CLI allows for local development and testing of serverless applications.

- Integration with AWS Services: SAM integrates seamlessly with other AWS services like IAM, DynamoDB, S3, etc

--

--

Priyanshu Bhatt

AWS Solutions Architect || Terraform Certified Associate || DevOps Engineer || I Share Crisp Tech Stories