Courseiva
SDLC Automation →mediumMultiple Choice

DOP-C02 SDLC Automation Practice Question

A company uses AWS CodeDeploy with a blue/green deployment strategy for an Amazon EC2 Auto Scaling group. During deployment, the new instances are failing health checks and the deployment is rolling back. What is the MOST likely cause?

⚠ Common exam trap

Many candidates assume the CodeDeploy agent is missing (Option D) because it's a common issue, but the agent must be present for the deployment to even start—health check failures occur after the agent has successfully installed the application.

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

✓

The new instances are not passing the configured health check grace period.

In a blue/green deployment with CodeDeploy, new instances are launched and must pass health checks before traffic is routed to them. If the health check grace period is not configured or is too short, the new instances may be deemed unhealthy before the application has fully started, triggering a rollback. This is the most likely cause because the health check grace period directly controls how long CodeDeploy waits before evaluating instance health.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • ✓

    The new instances are not passing the configured health check grace period.

    Why this is correct

    During a CodeDeploy blue/green deployment, the new instances (green) are launched and then a health check grace period is applied before traffic is shifted. If the application fails to become healthy within that window, CodeDeploy considers the deployment failed and automatically rolls back to the original blue fleet. This is the only condition that directly results in a rollback after the new instances are provisioned, making it the correct answer.

  • ✗

    The application is not registered with an Elastic Load Balancer.

    Why it's wrong here

    Blue/green deployments in CodeDeploy do not require an Elastic Load Balancer unless the deployment group is explicitly configured with one for traffic shifting and health validation. In an Auto Scaling group-backed blue/green deployment, CodeDeploy can manage traffic by registering and deregistering instances with the target group, but if no ELB is attached to the deployment group, it simply skips load-balancer traffic shifting and still completes the deployment. Therefore, the absence of an ELB does not cause the described rollback behavior.

  • ✗

    The deployment group is not configured to use an Auto Scaling group.

    Why it's wrong here

    The question explicitly states the company uses an Auto Scaling group, and CodeDeploy supports blue/green deployments that are backed by an Auto Scaling group. In such a deployment, the green environment is created by launching a new Auto Scaling group, and instances are added to it. If the deployment group were not configured to use an ASG, the deployment would likely fail with a configuration error rather than rolling back after a health check grace period, so this is not the cause.

  • ✗

    The CodeDeploy agent is not installed on the new instances.

    Why it's wrong here

    If the CodeDeploy agent were missing on the new instances, the deployment would fail during the initial installation and agent-connectivity phase, before health checks and traffic shifting ever execute. CodeDeploy would report a failure such as 'Agent never reported' and the deployment would stop, not reach the point of a grace-period rollback. Therefore, a missing agent is a different failure mode and not the reason for the observed rollback.

About these practice questions

Courseiva writes every DOP-C02 question from scratch — 1,298 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or 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 DOP-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 DOP-C02 exam.