Courseiva
DeploymenthardMultiple SelectObjective-mapped

DVA-C02 Deployment Practice Question

A developer is using AWS CodeDeploy to deploy an application to an Auto Scaling group. The deployment is set to use a 'OneAtATime' deployment configuration. The developer wants to ensure that the deployment does not cause downtime. Which TWO configurations are necessary?

⚠ Common exam trap

Watch out — candidates often think setting 'IgnoreApplicationStopFailures' or using 'AllAtOnce' can achieve zero downtime, but without a load balancer and health checks, traffic cannot be shifted away from instances during deployment.

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

Configure a load balancer for the Auto Scaling group.

Registering the Auto Scaling group with a load balancer allows CodeDeploy to deregister each instance before deployment and re-register it after the new application version is installed and passes health checks. This ensures traffic is shifted away from the instance being updated, preventing downtime during a 'OneAtATime' 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.

  • Set the 'IgnoreApplicationStopFailures' flag to true.

    Why it's wrong here

    Setting the 'IgnoreApplicationStopFailures' flag to true instructs CodeDeploy to proceed even if the ApplicationStop lifecycle event script fails. While it prevents the deployment from halting due to this specific error, it does not address the underlying issue. An application that fails to stop cleanly might leave resources locked, ports in use, or processes running, which can prevent the new application version from starting correctly or lead to an inconsistent state, ultimately causing service disruption and failing to prevent downtime.

  • Configure a load balancer for the Auto Scaling group.

    Why this is correct

    Configuring a load balancer for the Auto Scaling group is crucial for achieving zero-downtime deployments. A load balancer, such as an Application Load Balancer (ALB), can gracefully drain connections from instances being updated, ensuring active user sessions are not abruptly terminated. It then reroutes traffic to healthy, available instances, and only directs new traffic to instances once the updated application is fully deployed and passes health checks, thereby maintaining continuous service availability during the deployment process.

  • Use an 'AllAtOnce' deployment configuration.

    Why it's wrong here

    Using an 'AllAtOnce' deployment configuration directly contradicts the goal of preventing downtime. This configuration instructs CodeDeploy to update all target instances within the deployment group simultaneously. During this process, every instance will be taken offline as the old application is stopped and the new one is installed and started. This results in a complete service interruption across all instances, leading to significant and unavoidable downtime for end-users.

  • Configure health checks on the load balancer.

    Why this is correct

    Configuring robust health checks on the load balancer is essential for ensuring only healthy instances receive traffic throughout the deployment. These checks continuously monitor the application's responsiveness and availability on each instance. If a newly deployed application version on an instance fails its health checks, the load balancer will automatically stop routing traffic to that instance, preventing users from encountering errors and allowing the deployment to be rolled back or remediated without impacting the overall service availability.

  • Install the CodeDeploy agent on each instance.

    Why it's wrong here

    Installing the CodeDeploy agent on each instance is a fundamental prerequisite for CodeDeploy to function, as it enables the instance to receive and execute deployment commands. However, merely having the agent installed does not inherently implement strategies to prevent downtime. The agent facilitates the deployment process itself, but achieving zero-downtime requires additional configurations like load balancers, specific deployment configurations (e.g., 'OneAtATime', 'HalfAtATime'), and traffic shifting mechanisms.

About these practice questions

This DVA-C02 question is part of Courseiva's 724-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 →

How Courseiva writes practice questions · Editorial policy

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.