AWS Certified Developer – Associate (DVA-C02) — Question 521
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?
Answer options
- A. Create an AWS Serverless Application Model (AWS SAM) template. Configure the pipeline stages in CodePipeline to run the necessary AWS SAM CLI commands to deploy the serverless workload.
- B. Create an AWS Step Functions workflow template based on the infrastructure by using the Amazon States Language. Start the Step Functions state machine from the existing pipeline.
- C. Create an AWS CloudFormation template. Use the existing pipeline workflow to build a pipeline for AWS CloudFormation stacks.
- D. Create an AWS Serverless Application Model (AWS SAM) template. Use an automated script to deploy the serverless workload by using the AWS SAM CLI deploy command.
Correct answer: A
Explanation
AWS Serverless Application Model (AWS SAM) templates allow developers to define serverless infrastructure easily, and the AWS SAM CLI provides local testing capabilities for serverless workloads. Integrating AWS SAM CLI commands directly into the existing AWS CodePipeline stages ensures a seamless, automated deployment process. Using standard AWS CloudFormation templates does not natively support local testing of serverless resources, and using Step Functions or external scripts does not leverage the pipeline's native capabilities as effectively.