Courseiva
Question 953 of 724
DeploymenteasyMultiple ChoiceObjective-mapped

DVA-C02 Deployment Practice Question

A developer is using AWS CodeDeploy to deploy an application to an Amazon ECS service using the Fargate launch type. The developer wants to ensure that the deployment rolls back automatically if the new task set fails health checks. Which configuration should the developer set?

⚠ Common exam trap

Watch out — candidates often confuse CloudWatch alarms as the only way to trigger a rollback, but CodeDeploy's built-in rollback feature directly responds to health check failures without needing an alarm.

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

Enable rollback in the deployment group settings.

Enabling rollback in the deployment group settings allows CodeDeploy to automatically revert the deployment to the previous working task set if the new task set fails health checks. This is a native feature of CodeDeploy that monitors the health of the ECS service and triggers a rollback without manual intervention.

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 deployment type to in-place.

    Why it's wrong here

    In-place deployments are exclusively for EC2/On-Premises compute platforms, where application revisions are deployed directly onto existing instances. AWS CodeDeploy for Amazon ECS only supports blue/green deployments, which involve provisioning a new set of tasks and shifting traffic. Therefore, selecting 'in-place' is incompatible with ECS deployments and does not provide automatic rollback on health check failures for ECS services.

  • Enable rollback in the deployment group settings.

    Why this is correct

    Enabling rollback in the CodeDeploy deployment group settings for an Amazon ECS blue/green deployment directly configures the system to monitor the health of the newly deployed task set. If the new tasks fail to pass the configured health checks (e.g., ELB target group health checks or ECS task health checks) within a specified period, CodeDeploy will automatically revert traffic to the original, stable task set, ensuring service continuity.

  • Set the deployment configuration to CodeDeployDefault.OneAtATime.

    Why it's wrong here

    The CodeDeployDefault.OneAtATime deployment configuration is designed for EC2/On-Premises compute platforms to control the rate at which traffic is shifted to new instances during an in-place deployment. It dictates that traffic is shifted to one instance at a time. This configuration is not applicable to Amazon ECS blue/green deployments, which manage traffic shifting between entire task sets, and it does not directly enable automatic rollback based on health check failures.

  • Configure CloudWatch alarms to trigger a rollback.

    Why it's wrong here

    While AWS CloudWatch alarms can be configured to trigger custom rollback actions by invoking Lambda functions or other services, they are not the direct mechanism for automatic rollback on health check failure within a CodeDeploy ECS blue/green deployment. CodeDeploy's deployment group settings offer a native, integrated capability to monitor the health of the new task set and automatically initiate a rollback if health checks fail, without requiring external alarm configurations for this specific scenario.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Last reviewed: Jun 11, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

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.