Courseiva
Deployment →hardMultiple Choice

DVA-C02 Deployment Practice Question

Exhibit

Refer to the exhibit. Output from aws deploy get-deployment --deployment-id d-EXAMPLE:

{
    "deploymentInfo": {
        "applicationName": "MyApp",
        "deploymentGroupName": "MyDG",
        "status": "Failed",
        "errorInformation": {
            "code": "HEALTH_CONSTRAINTS",
            "message": "Some instances failed to meet the minimum health requirements."
        },
        "deploymentOverview": {
            "Pending": 0,
            "InProgress": 0,
            "Succeeded": 3,
            "Failed": 2,
            "Skipped": 0
        },
        "creator": "user"
    }
}

A developer performed a CodeDeploy deployment to an Auto Scaling group. The deployment status is Failed with code HEALTH_CONSTRAINTS. Based on the exhibit, what is the most likely cause?

⚠ Common exam trap

DVA-C02 often tests the ability to distinguish CodeDeploy error codes — candidates who pick 'agent not running' or 'IAM permissions' miss that HEALTH_CONSTRAINTS specifically points to the minimum healthy hosts threshold not being met 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

✓

The minimum number of healthy instances required for the deployment was not met

The HEALTH_CONSTRAINTS error in CodeDeploy means the deployment could not maintain the minimum number of healthy instances specified in the deployment configuration during the deployment. This typically occurs when instances fail health checks, the ASG cannot launch replacements fast enough, or the deployment configuration's minimum healthy hosts threshold is too high relative to available capacity. The most likely cause is that the minimum healthy instance requirement was not met.

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 CodeDeploy agent on the instances is not running

    Why it's wrong here

    If the CodeDeploy agent were not running on the target instances, CodeDeploy would typically report errors such as "AGENT_NOT_INSTALLED" or "AGENT_UNHEALTHY" for those specific instances, indicating a communication failure. The deployment would likely stall or fail for those particular instances, but the overarching deployment error would not be HEALTH_CONSTRAINTS, which specifically relates to the availability of healthy instances during the deployment process itself.

  • ✓

    The minimum number of healthy instances required for the deployment was not met

    Why this is correct

    A HEALTH_CONSTRAINTS error in CodeDeploy explicitly indicates that the deployment configuration's specified minimum number of healthy instances could not be maintained throughout the deployment lifecycle. This often occurs when instances fail to come online, become unhealthy during a phased deployment (e.g., CodeDeployDefault.OneAtATime or HalfAtATime), or if the Auto Scaling group scales down unexpectedly. The deployment stops because proceeding would violate the application's availability requirements defined by the deployment group's health constraints.

  • ✗

    The application revision contains invalid scripts

    Why it's wrong here

    If the application revision contained invalid scripts, such as syntax errors or incorrect commands in the appspec.yml hooks, CodeDeploy would typically report specific SCRIPT_FAILURE or INSTANCE_FAILURE errors for the affected instances. These errors would detail which script failed and at what lifecycle event, leading to individual instance deployment failures rather than a global HEALTH_CONSTRAINTS error, which implies a broader issue with maintaining the overall fleet's health.

  • ✗

    The IAM role for CodeDeploy does not have sufficient permissions

    Why it's wrong here

    Insufficient permissions for the CodeDeploy service role would manifest as ACCESS_DENIED errors when CodeDeploy attempts to perform actions like reading from S3, interacting with EC2 instances, or updating Auto Scaling groups. These errors would typically occur early in the deployment process, preventing CodeDeploy from even initiating or progressing certain steps, rather than resulting in a HEALTH_CONSTRAINTS error, which specifically relates to the operational health and availability of the target instances during the deployment.

About these practice questions

One of 1,135 original DVA-C02 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

JA

Written and reviewed by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

Last reviewed September 2026 · checked against the official Amazon Web Services exam blueprint

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.