Courseiva
Incident and Event ResponsemediumMultiple ChoiceObjective-mapped

DOP-C02 Incident and Event Response Practice Question

A company uses AWS CodePipeline for CI/CD. During a production deployment, the pipeline fails at the 'Deploy' stage with an error: 'The deployment failed because the deployment group does not have enough capacity to handle the deployment.' The engineer checks the CodeDeploy deployment group and sees that it is configured with a minimum healthy hosts of 100% and a deployment configuration of 'CodeDeployDefault.OneAtATime'. What is the MOST likely cause?

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 deployment group has only one instance, and the minimum healthy hosts setting prevents the deployment.

The deployment group has only one instance. With a minimum healthy hosts of 100%, CodeDeploy requires that all hosts remain healthy during the deployment. The 'CodeDeployDefault.OneAtATime' configuration updates only one instance at a time, but if there is only one instance, taking it out of service to deploy violates the minimum healthy hosts requirement, causing the 'not enough capacity' error. Option A is incorrect because the deployment configuration is compatible; the issue is the lack of capacity. Option B is incorrect because the error message specifically mentions capacity, not health check failures. Option C is incorrect because a CodeDeploy agent issue would typically result in a different error, such as 'The overall deployment failed because too many individual instances failed 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.

  • The deployment configuration 'OneAtATime' is not compatible with the deployment group.

    Why it's wrong here

    The 'OneAtATime' deployment configuration is absolutely compatible with CodeDeploy deployment groups for EC2/On-Premises in-place deployments. It simply means CodeDeploy deploys the application revision to one instance at a time, waiting for each to pass before moving to the next. The failure you'd see here is not an incompatibility error but rather a minimum healthy hosts constraint violation, which occurs before any instance is ever targeted.

  • The target group health check is misconfigured, causing all instances to be unhealthy.

    Why it's wrong here

    A misconfigured target group health check would produce a different sequence of failures. CodeDeploy gets the health of instances from the associated target group during the 'BeforeAllowTraffic' or 'AfterAllowTraffic' lifecycle events, and if instances are unhealthy, you'd see errors like 'The instance is not healthy' or 'The target group health check failed.' That would happen after the deployment has started, not during the pre-flight validation that aborts because the minimum number of healthy hosts can't be met.

  • The CodeDeploy agent on the instances is not running.

    Why it's wrong here

    If the CodeDeploy agent were not running on the instance, the deployment would begin and then fail when CodeDeploy tries to contact the agent to execute scripts or download the revision. You'd see errors like 'Agent did not receive a ping' or 'The overall deployment failed because the agent could not be reached.' That is a runtime, per-instance failure, completely different from the fleet-level 'minimum healthy hosts' calculation that blocks the deployment before any agent activity.

  • The deployment group has only one instance, and the minimum healthy hosts setting prevents the deployment.

    Why this is correct

    CodeDeploy enforces a minimum number of healthy hosts as a safety condition, and when the deployment group has exactly one instance, any positive minimum healthy host count makes an in-place deployment impossible. With a setting of 100% or 1, taking that only instance out of service to deploy to it would reduce the healthy host count to 0, violating the constraint and aborting the deployment at the very start. The error message specifically mentions that the deployment was aborted because the minimum number of healthy hosts was not met.

About these practice questions

This DOP-C02 question is part of Courseiva's 1,013-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 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.