DVA-C02 CodeDeployDefault.HalfAtATime Practice Question
A developer is using AWS CodeDeploy to deploy an application to an EC2 Auto Scaling group. The deployment must follow a rolling update, deploying to exactly 50% of the instances at a time. Which built-in deployment configuration should the developer use?
⚠ Common exam trap
Many exam-takers confuse CodeDeployDefault.HalfAtATime with CodeDeployDefault.OneAtATime or CodeDeployDefault.AllAtOnce, or incorrectly apply Lambda-specific configurations like CodeDeployDefault.LambdaAllAtOnce to EC2 deployments.
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
✓
CodeDeployDefault.HalfAtATime
CodeDeployDefault.HalfAtATime, is correct because it instructs CodeDeploy to deploy to exactly 50% of the instances in the Auto Scaling group at a time during a rolling update. This built-in configuration ensures that half the instances are updated before the other half, matching the requirement for a 50% rolling deployment.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
CodeDeployDefault.OneAtATime
Why it's wrong here
OneAtATime deploys to a single instance per batch, not 50% of the Auto Scaling group, so the specified batch size is not achieved. It is tempting because it maximises availability, and it would be correct when the requirement is minimum capacity loss regardless of deployment duration.
- ✓
CodeDeployDefault.HalfAtATime
Why this is correct
CodeDeployDefault.HalfAtATime deploys to half the instances in the deployment group simultaneously, then the remainder, satisfying the exact 50% rolling update constraint. It is a built-in configuration, so no custom deployment configuration needs creating, and it works with EC2 Auto Scaling groups during in-place deployments.
- ✗
CodeDeployDefault.AllAtOnce
Why it's wrong here
AllAtOnce deploys to every instance simultaneously, so no rolling progression occurs and the 50% batch requirement is unmet. It is tempting because it completes fastest, and it would be correct for a non-production environment where brief total downtime is acceptable and speed matters.
- ✗
CodeDeployDefault.LambdaAllAtOnce
Why it's wrong here
LambdaAllAtOnce is a configuration for Lambda compute platforms, not EC2 or Auto Scaling groups, so it cannot govern instance batches at all. It is tempting because it appears in the same CodeDeploy configuration list, and it would be correct when deploying a Lambda function rather than EC2 instances.
Go deeper
Related to this question
About these practice questions
One of 1,135 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.