DVA-C02 Deployment Practice Question
A developer is using AWS CodePipeline to deploy a web application. The pipeline has a source stage that pulls from CodeCommit and a deploy stage that uses AWS Elastic Beanstalk. The developer wants to run unit tests automatically before deploying to Elastic Beanstalk. Which action should the developer add to the pipeline?
⚠ Common exam trap
Many exam-takers confuse health checks (which monitor runtime health) with unit tests (which validate code logic), or think a manual approval step can substitute for automated testing, but AWS specifically tests the understanding that CodeBuild is the service designed for running custom build and test commands in a pipeline.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Add a test stage that uses an AWS CodeBuild project configured to run unit tests
AWS CodeBuild can be integrated as a test stage in CodePipeline to run unit tests automatically. By adding a CodeBuild project configured with a buildspec.yml file that executes unit tests, the pipeline will run tests after the source stage and before the deploy stage, ensuring only code that passes tests is deployed to Elastic Beanstalk.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Add a test stage that uses an AWS CodeBuild project configured to run unit tests
Why this is correct
AWS CodeBuild is specifically designed to run custom build and test commands as part of a CI/CD pipeline. By integrating a CodeBuild project into a dedicated test stage within AWS CodePipeline, developers can execute unit tests, integration tests, or even security scans against their application code in a managed compute environment. This ensures that code quality and functionality are validated automatically before proceeding to deployment, catching issues early in the development lifecycle.
- ✗
Add a manual approval step before the deploy stage
Why it's wrong here
A manual approval step in AWS CodePipeline serves as a gate to pause pipeline execution, requiring explicit human intervention to proceed. Its primary function is to provide a human review point, such as for compliance checks or final sign-off, rather than performing any automated code validation or test execution. This step does not contribute to automated testing capabilities, as it merely waits for a user to approve or reject the current pipeline state.
- ✗
Configure Elastic Beanstalk health checks to run tests
Why it's wrong here
Elastic Beanstalk health checks are designed to monitor the operational status and availability of an application *after* it has been deployed, not to execute pre-deployment tests. These checks typically assess server responsiveness, resource utilization, and application-specific endpoints to determine the health of instances in an environment. They are reactive monitoring tools that report on the application's runtime state, fundamentally different from proactive testing that validates code correctness before deployment.
- ✗
Replace Elastic Beanstalk with AWS CodeDeploy
Why it's wrong here
Replacing AWS Elastic Beanstalk with AWS CodeDeploy as the deployment service within a CodePipeline primarily changes the mechanism by which application revisions are deployed to target environments. While CodeDeploy offers more granular control over deployment strategies like blue/green or in-place updates, neither service inherently provides a testing execution environment within the pipeline itself. This action would modify the deployment phase but would not introduce or enhance the pipeline's capability to run automated tests.
Go deeper
Related to this question
About these practice questions
One of 724 original DVA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This DVA-C02 practice question is part of Courseiva's free Amazon Web Services certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the DVA-C02 exam.