Jeff’s Note #
Unlike generic exam dumps, ADH analyzes this scenario through the lens of a Real-World Lead Developer.
For DVA-C02 candidates, the confusion often lies in picking the right CI/CD tools and deployment techniques to manage multi-account infrastructure without manual overhead. In production, this is about knowing exactly which AWS services facilitate seamless automation for provisioning resources and running tests across accounts, while minimizing admin complexity. Let’s drill down.
The Certification Drill (Simulated Question) #
Scenario #
NexaSoft is a SaaS company delivering specialized business applications to clients. Each client maintains their own AWS account where NexaSoft deploys dedicated infrastructure, including Amazon EC2 instances and Amazon RDS databases, to isolate workloads securely. Prior to releasing new features, NexaSoft needs to run integration tests against real infrastructure deployed freshly in each client’s AWS account.
A Lead Developer must design a continuous delivery pipeline that automates provisioning this test infrastructure in multiple AWS accounts and runs integration tests, with the least amount of ongoing administrative effort.
The Requirement: #
Automate infrastructure provisioning and test execution in multiple AWS accounts as part of a CI/CD pipeline, minimizing manual steps and complexity.
The 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.
-
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.
Google adsense #
leave a comment:
Correct Answer #
B) Use AWS CodePipeline with AWS CloudFormation StackSets to deploy the infrastructure. Use AWS CodeBuild to run the tests.
Quick Insight: The Developer CI/CD Imperative #
- Using CodePipeline ensures full orchestration of build, deploy, and test stages.
- CloudFormation StackSets allow scalable, multi-account infrastructure deployment with minimal admin.
- CodeBuild is the natural choice for build/test automation in the pipeline, with rich integration.
- CodeDeploy is typically used for application deployments, not test execution.
- Amazon CodeGuru is for code reviews and profiling, not test orchestration.
Content Locked: The Expert Analysis #
You’ve identified the answer. But do you know the implementation details that separate a Junior from a Senior?
The Expert’s Analysis #
Correct Answer #
Option B
The Winning Logic #
- AWS CodePipeline is designed to orchestrate the entire CI/CD workflow including provisioning infrastructure, running builds, and executing tests.
- CloudFormation StackSets distinctly support deploying consistent infrastructure templates across multiple AWS accounts and regions automatically, minimizing manual account setup.
- AWS CodeBuild provides a fully managed, scalable environment to run integration tests, easily integrated as a pipeline stage.
- Using StackSets within CodePipeline enables streamlined approval and rollback capabilities.
- This architecture reduces admin overhead by centralizing orchestration and automating test runs without custom resources or manual steps.
The Trap (Distractor Analysis): #
- Why not A? AWS CodeDeploy is primarily used to deploy application code to compute resources, not for orchestrating infrastructure provisioning or executing test suites. Amazon CodeGuru helps with static/dynamic code analysis but does not run integration tests in pipeline stages.
- Why not C? Using CloudFormation change sets and custom resources to run tests increases complexity and potential failure points. Custom resources can be brittle and increase maintenance. StackSets are better suited for multi-account provisioning.
- Why not D? AWS SAM is optimized for serverless applications, not EC2 or RDS provisioning. Also, CodeDeploy does not natively run integration tests; CodeBuild is the preferred service for executing CI/CD build/test activities.
The Technical Blueprint #
# Example AWS CLI command to deploy CloudFormation StackSet targeting multiple accounts
aws cloudformation create-stack-set --stack-set-name "NexaSoftTestInfra" \
--template-body file://test-infrastructure.yaml
aws cloudformation create-stack-instances --stack-set-name "NexaSoftTestInfra" \
--accounts "111122223333" "444455556666" --regions "us-east-1" "us-west-2"
# CodeBuild buildspec.yml snippet
version: 0.2
phases:
install:
runtime-versions:
python: 3.8
build:
commands:
- echo "Running integration tests against provisioned infrastructure"
- pytest tests/integration
The Comparative Analysis #
| Option | API Complexity | Performance | Use Case |
|---|---|---|---|
| A | Moderate (CodeDeploy + StackSets) | Suboptimal for tests | Infrastructure deploy + code profiling, not test orchestration |
| B | Low (Native integration) | High | CI/CD pipeline with multi-account deploy and tests |
| C | High (Custom CloudFormation resource) | Moderate | Custom but complex; risky for reliability |
| D | Moderate (SAM + CodeDeploy) | Suboptimal | Serverless focus, improper test execution tool |
Real-World Application (Practitioner Insight) #
Exam Rule #
“For the exam, always pick CodePipeline when you see coordinated multi-stage build, deploy, and test automation.”
Real World #
“In actual projects, you might combine StackSets with EventBridge rules or Systems Manager Automation for additional governance, but that’s beyond the scope for exam-style questions focused on least admin effort.”
(CTA) Stop Guessing, Start Mastering #
Disclaimer
This is a study note based on simulated scenarios for the DVA-C02 exam.