DVA-C02 practice question 18 of 35

A company offers a business-to-business software service that runs on dedicated infrastructure deployed in each customer's AWS account. Before a…

Full set: 598 questions

Domain Troubleshooting and Optimization

A company offers a business-to-business software service that runs on dedicated infrastructure deployed in each customer's AWS account. Before a feature release, the company needs to run integration tests on real AWS test infrastructure. The test infrastructure consists of Amazon EC2 instances and an Amazon RDS database. A developer must set up a continuous delivery process that will provision the test infrastructure across the different AWS accounts. The developer then must run the integration tests. Which solution will meet these requirements with the LEAST administrative effort?
Answer options
A: Use AWS CodeDeploy with AWS CloudFormation StackSets to deploy the infrastructure. Use Amazon CodeGuru to run the tests.
B: Use AWS CodePipeline with AWS CloudFormation StackSets to deploy the infrastructure. Use AWS CodeBuild to run the tests. Correct answer
C: Use AWS CodePipeline with AWS CloudFormation change sets to deploy the infrastructure. Use a CloudFormation custom resource to run the tests.
D: Use AWS Serverless Application Model (AWS SAM) templates with AWS CloudFormation change sets to deploy the infrastructure. Use AWS CodeDeploy to run the tests.
Correct Answer:
B. Use AWS CodePipeline with AWS CloudFormation StackSets to deploy the infrastructure. Use AWS CodeBuild to run the tests.
Explanation

This solution requires a continuous delivery pipeline that can deploy infrastructure across multiple AWS accounts and then run tests. AWS CodePipeline is the service designed to orchestrate such workflows. For deploying infrastructure defined in AWS CloudFormation templates to multiple accounts from a central location, AWS CloudFormation StackSets is the most efficient tool, minimizing administrative effort. After the infrastructure is provisioned, AWS CodeBuild provides a fully managed environment to compile code, run integration tests against the new infrastructure, and report the results, seamlessly integrating as a test action within CodePipeline. This combination directly addresses all requirements using the most appropriate services for each task.

Why Incorrect

A. Amazon CodeGuru is a code quality and security analysis service; it does not execute integration tests. AWS CodeDeploy is for application deployment, not infrastructure provisioning.
C. CloudFormation change sets are for previewing updates to a single stack, not for deploying across multiple accounts. StackSets is the correct tool for multi-account deployments.
D. AWS SAM is optimized for serverless applications, not for EC2 and RDS infrastructure. AWS CodeDeploy is not the primary service for running integration tests; CodeBuild is.

References

1. AWS CloudFormation User Guide: "AWS CloudFormation StackSets extends the functionality of stacks by enabling you to create, update, or delete stacks across multiple accounts and AWS Regions with a single operation." This supports the use of StackSets for multi-account deployment. (See the "Working with AWS CloudFormation StackSets" section).

2. AWS CodePipeline User Guide: The guide lists "AWS CloudFormation StackSets" as a valid deployment action provider, confirming its integration for multi-account deployments within a pipeline. (See the "AWS CodePipeline action structure reference" -> "Action reference for CloudFormationStackSet").

3. AWS CodeBuild User Guide: "AWS CodeBuild is a fully managed continuous integration service... CodeBuild compiles your source code, runs tests, and produces software packages that are ready to deploy." This confirms its role in running tests. (See the "What Is AWS CodeBuild?" section).

4. AWS CodePipeline User Guide: The guide details adding a test action to a pipeline, with AWS CodeBuild being a primary provider option. This demonstrates the intended architecture of using CodePipeline to orchestrate infrastructure deployment followed by a CodeBuild test stage. (See "Tutorial: Create a simple pipeline (S3 bucket)" which shows the standard Source -> Build -> Deploy/Test stages).

Scroll to Top