You must automate deployments for a serverless, event-driven application. You need reusable infrastructure templates, the ability to test the application locally before deployment, and to include infrastructure changes within an existing AWS CodePipeline pipeline. Which approach satisfies these requirements?
Choose an answer
Tap an option to check your answer.
Correct answer: Author an AWS Serverless Application Model (AWS SAM) template. Configure stages in the existing CodePipeline pipeline to run the AWS SAM CLI commands required to deploy the serverless application..
Why this is the answer
AWS SAM (Serverless Application Model) is an extension of CloudFormation specifically designed for serverless applications. It provides a simplified syntax for defining serverless resources like Lambda functions, APIs, and DynamoDB tables, addressing the need for reusable infrastructure templates. The AWS SAM CLI allows for local testing and debugging of serverless applications, fulfilling that requirement. SAM templates can be easily integrated into existing AWS CodePipeline pipelines by adding build stages that execute sam build and deploy stages that execute sam deploy commands. Incorrect options: AWS Step Functions is for orchestrating workflows, not defining infrastructure. While CloudFormation can define infrastructure, SAM offers a more streamlined experience for serverless applications and direct local testing capabilities not inherent to raw CloudFormation. Using an automated script outside CodePipeline would bypass the existing pipeline's structure and benefits.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed