Choosing the Right CodeDeploy Deployment Configuration for Availability and Speed
A developer is using AWS CodeDeploy to deploy an application to an EC2 Auto Scaling group. The application must remain fully available; only one instance should be taken offline at a time. The developer wants to configure the deployment to update instances one by one, ensuring that the deployment fails fast if any instance fails to deploy. Which deployment configuration should the developer choose?
⚠ Common exam trap
Many exam-takers confuse deployment configurations (like OneAtATime) with deployment types (like BlueGreen), or incorrectly assume that HalfAtATime updates instances one by one when it actually updates half the fleet at a time.
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.OneAtATime
CodeDeployDefault.OneAtATime, is correct because it deploys the application to one instance at a time, ensuring that only one instance is taken offline during the deployment. This satisfies the requirement for the application to remain fully available. Additionally, this configuration fails fast: if any instance fails to deploy, the deployment stops immediately, preventing further instances from being updated.
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.AllAtOnce
Why it's wrong here
The CodeDeployDefault.AllAtOnce configuration updates all instances within the target deployment group simultaneously. While this approach offers the fastest deployment time, it inherently leads to a complete service interruption for the entire application during the update process, as all instances are unavailable or transitioning at once. This strategy provides no capacity to serve traffic during the deployment, making it unsuitable for applications requiring high availability.
- ✗
CodeDeployDefault.HalfAtATime
Why it's wrong here
The CodeDeployDefault.HalfAtATime configuration updates 50% of the instances in the deployment group at any given time. While it maintains some application availability by keeping half the instances online, reducing the active capacity by half during the deployment window can significantly impact performance and user experience, especially under peak load conditions. This strategy does not guarantee minimal impact and could still lead to service degradation if the remaining half cannot handle the full traffic volume.
- ✓
CodeDeployDefault.OneAtATime
Why this is correct
The CodeDeployDefault.OneAtATime configuration updates only one instance in the target deployment group at a time. This strategy ensures maximum application availability by keeping the vast majority of instances serving traffic throughout the deployment process. It minimizes the blast radius of any potential deployment failure and allows for quick rollback or termination of the deployment if issues are detected on the single updated instance, making it ideal for critical applications requiring continuous operation.
- ✗
CodeDeployDefault.BlueGreen
Why it's wrong here
CodeDeployDefault.BlueGreen is a distinct deployment type in AWS CodeDeploy, not an in-place deployment configuration like the others listed. It involves provisioning an entirely new set of instances (the 'green' environment) with the new application version, while the existing 'blue' environment continues to serve traffic. Traffic is then shifted to the green environment, allowing for zero-downtime deployments and easy rollback by simply reverting traffic to the blue environment. This question specifically asks about in-place deployment configurations for an EC2 Auto Scaling group, which Blue/Green is not.
Go deeper
Related to this question
About these practice questions
This DVA-C02 question is part of Courseiva's 1,135-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
Same concept, more angles
5 more ways this is tested on DVA-C02
These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.
Variation 1. A developer is using AWS CodeDeploy to deploy an application to an Auto Scaling group. The deployment must be as fast as possible while ensuring that at least 50% of instances remain healthy throughout. Which deployment configuration should be used?
hard- A.CodeDeployDefault.OneAtATime
- ✓ B.CodeDeployDefault.HalfAtATime
- C.CodeDeployDefault.AllAtOnce
- D.CodeDeployDefault.MinHealthyPercent
Why B: CodeDeployDefault.HalfAtATime is the correct choice because it deploys to half of the instances in the Auto Scaling group at a time, ensuring that at least 50% of instances remain healthy throughout the deployment. This configuration balances speed (by deploying to multiple instances concurrently) with the required availability constraint, making it the fastest option that satisfies the 'at least 50% healthy' requirement.
Variation 2. A developer is using AWS CodeDeploy to deploy an application to a fleet of EC2 instances in an Auto Scaling group. The application must remain available during the deployment. The developer wants to update one instance at a time, ensuring that only one instance is taken offline at any moment. Which deployment configuration should the developer choose?
medium- ✓ A.CodeDeployDefault.OneAtATime
- B.CodeDeployDefault.HalfAtATime
- C.CodeDeployDefault.AllAtOnce
- D.CodeDeployDefault.LambdaCanary10Percent5Minutes
Why A: CodeDeployDefault.OneAtATime is the correct deployment configuration because it deploys the application to only one instance at a time, ensuring that the remaining instances continue to serve traffic. This matches the requirement to take only one instance offline at any moment, preserving high availability throughout the deployment.
Variation 3. A developer is using AWS CodeDeploy to deploy an application to an EC2 Auto Scaling group. The deployment must ensure that a minimum number of instances are always running and healthy. The developer wants to deploy to 10 instances. Which deployment configuration should the developer use?
hard- ✓ A.CodeDeployDefault.OneAtATime
- B.CodeDeployDefault.AllAtOnce
- C.CodeDeployDefault.HalfAtATime
- D.CodeDeployDefault.MinHealthyHostsPercentage: 90
Why A: CodeDeployDefault.OneAtATime, is correct because it ensures that only one instance is updated at a time, which guarantees that a minimum number of instances (9 out of 10) remain healthy and running throughout the deployment. This configuration is ideal for maintaining high availability and meeting strict uptime requirements.
Variation 4. 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?
medium- A.CodeDeployDefault.OneAtATime
- ✓ B.CodeDeployDefault.HalfAtATime
- C.CodeDeployDefault.AllAtOnce
- D.CodeDeployDefault.LambdaAllAtOnce
Why B: 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.
Variation 5. A developer is using AWS CodeDeploy to deploy an application to an Auto Scaling group. The deployment is configured with a 'OneAtATime' deployment configuration. The developer notices that the deployment is taking a long time. What is the most likely reason?
easy- A.The deployment group is configured with an incorrect load balancer.
- ✓ B.The Auto Scaling group has a large number of instances, and deploying one at a time is slow.
- C.The deployment configuration is set to 'AllAtOnce', but the developer intended 'OneAtATime'.
- D.The CodeDeploy agent on the instances is not running.
Why B: The 'OneAtATime' deployment configuration deploys to one instance at a time, so if the Auto Scaling group has a large number of instances, the deployment will take a long time. Option A is incorrect because the load balancer configuration does not directly affect deployment speed when using 'OneAtATime'. Option C is incorrect because the deployment configuration is correctly set to 'OneAtATime', not 'AllAtOnce'. Option D is incorrect because if the CodeDeploy agent were not running, the deployment would likely fail entirely, not just be slow.
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.