StudyToCert

All certifications / Developer Associate / Lessons

AWS Certified Developer – Associate DVA-C02 · Domain 3: Deployment

AWS SAM: template structure, sam build, sam deploy --guided, sam local invoke / start-api, samconfig.toml

▶ Watch the overview video

Last reviewed October 6, 2026 · Leer en español

Explain it simpler

AWS SAM is a shortcut for describing and shipping serverless apps. Instead of writing hundreds of lines to set up a function, its trigger and its permissions, you write a short recipe file called a template, and SAM expands it into the full instructions AWS needs. SAM also comes with a command-line tool. One command gathers your code and libraries, another runs your function on your own computer inside a small container so you can test it, and another sends everything to AWS. The first time you deploy, SAM asks you a few questions and remembers your answers in a settings file. It is like a meal kit: a short card of instructions, the ingredients prepared for you, and a note of how you liked it last time.

Marcus joins the platform team at Juniper Health Services on a Monday. His first ticket: add a new GET route to the appointments API and prove it works before lunch. The previous developer left a folder with a template.yaml, a src directory and a file called samconfig.toml, but no notes. Marcus does not want to click through the console, and he certainly does not want to deploy straight to the shared account to find out whether his handler parses the path parameter correctly. He opens the template and sees a Transform line at the top and an Events block under the function. What do these pieces do, and how can he test locally and then deploy with a single command?

The AWS Serverless Application Model (SAM) is an open-source framework for building serverless applications on AWS. It has two parts that the exam treats separately. The first is a template format: an extension of AWS CloudFormation that adds concise resource types for serverless building blocks. The second is the SAM command line interface (CLI), which builds your code, runs it locally for testing, and deploys it. Knowing which part does what, and which CLI command answers which need, is the core of most SAM questions.

Free account

Keep reading for free

Create a free StudyToCert account to read the rest of this lesson: 8 more sections, 7 key terms, a real-world example, an exam tip and self-check questions. Every lesson, lab and practice test is free with an account.

Sign up free Log in

Study Developer Associate for free
A week-by-week plan with every lesson, quizzes, checkpoint tests, a practice exam and hands-on labs.
Open the Developer Associate study plan