nerdexam
Amazon

DVA-C02 · Question #549

A developer needs to automate deployments for a serverless, event-based workload. The developer needs to create standardized templates to define the infrastructure and to test the functionality of the

The correct answer is A. Create an AWS Serverless Application Model (AWS SAM) template. Configure the pipeline. AWS SAM provides serverless-specific CloudFormation shorthand templates and the sam local command for local testing, and integrates natively with existing CodePipeline pipelines.

Submitted by yaw92· Mar 5, 2026Deployment

Question

A developer needs to automate deployments for a serverless, event-based workload. The developer needs to create standardized templates to define the infrastructure and to test the functionality of the workload locally before deployment. The developer already uses a pipeline in AWS CodePipeline. The developer needs to incorporate any other infrastructure changes into the existing pipeline. Which solution will meet these requirements?

Options

  • ACreate an AWS Serverless Application Model (AWS SAM) template. Configure the pipeline
  • BCreate an AWS Step Functions workflow template based on the infrastructure by using the
  • CCreate an AWS CloudFormation template. Use the existing pipeline workflow to build a pipeline
  • DCreate an AWS Serverless Application Model (AWS SAM) template. Use an automated script to

How the community answered

(59 responses)
  • A
    78% (46)
  • B
    12% (7)
  • C
    3% (2)
  • D
    7% (4)

Why each option

AWS SAM provides serverless-specific CloudFormation shorthand templates and the `sam local` command for local testing, and integrates natively with existing CodePipeline pipelines.

ACreate an AWS Serverless Application Model (AWS SAM) template. Configure the pipelineCorrect

AWS SAM extends CloudFormation with simplified resource types (AWS::Serverless::Function, etc.) designed for event-driven serverless workloads. The SAM CLI enables local invocation and testing of Lambda functions before deployment. SAM templates deploy via CloudFormation, making them directly compatible with an existing CodePipeline pipeline using the CloudFormation deploy action.

BCreate an AWS Step Functions workflow template based on the infrastructure by using the

AWS Step Functions workflow templates define runtime execution logic, not infrastructure; they cannot define or deploy Lambda functions or other infrastructure resources.

CCreate an AWS CloudFormation template. Use the existing pipeline workflow to build a pipeline

Standard CloudFormation templates do not include native local testing capabilities for serverless workloads; SAM is the purpose-built tool that adds this functionality on top of CloudFormation.

DCreate an AWS Serverless Application Model (AWS SAM) template. Use an automated script to

Using an automated script to deploy outside of the existing CodePipeline pipeline contradicts the requirement to incorporate infrastructure changes into the existing pipeline.

Concept tested: AWS SAM for serverless infrastructure templates and local testing

Source: https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/what-is-sam.html

Community Discussion

No community discussion yet for this question.

Full DVA-C02 Practice