Courseiva
Deployment →mediumMultiple Choice

DVA-C02 Deployment Practice Question

A company is using AWS CodeDeploy to deploy a web application to an Auto Scaling group of EC2 instances. The deployment fails with the error 'The overall deployment failed because too many individual instances failed deployment.' What is the most likely cause?

⚠ Common exam trap

DVA-C02 often tests whether candidates focus on the root cause of individual failures instead of recognizing that the error message describes the aggregate failure threshold being exceeded, leading them to pick appspec or IAM options.

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 number of instances that failed deployment exceeded the configured failure threshold.

The error message explicitly states that too many individual instances failed deployment, which means the number of failed instances exceeded the configured failure threshold (either the default or a custom value in the deployment configuration). CodeDeploy stops the deployment when this threshold is breached to prevent a full outage. The most likely cause is that the failure count crossed that limit, often due to a bad revision or environment issue.

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 application specification file (appspec) is missing required hooks.

    Why it's wrong here

    If the application specification file (appspec.yml) is missing required lifecycle event hooks, CodeDeploy would typically report errors specific to the execution of those missing or malformed scripts on individual instances. This would manifest as a script execution failure during a particular lifecycle event (e.g., BeforeInstall, ApplicationStart) for the affected instances, rather than a general deployment failure due to exceeding a cumulative failure threshold across the entire deployment group. The error would pinpoint the missing hook or script issue.

  • ✗

    The IAM role for CodeDeploy does not have sufficient permissions to call EC2 APIs.

    Why it's wrong here

    The CodeDeploy service role requires specific IAM permissions to interact with other AWS services, including EC2, to identify and manage target instances. If the IAM role associated with CodeDeploy lacks the necessary permissions to call EC2 APIs (e.g., `ec2:DescribeInstances`, `ec2:DescribeTags`), the deployment would fail early with an `AccessDeniedException`. This type of error occurs at the service level when CodeDeploy attempts to gather information or perform actions on EC2, preventing the deployment from even starting instance-level operations where a failure threshold would be relevant.

  • ✗

    The Auto Scaling group does not have enough instances to meet the minimum healthy count.

    Why it's wrong here

    CodeDeploy deployments are often configured with a minimum healthy host count or percentage, which dictates the number of instances that must remain healthy and available throughout the deployment process. If the Auto Scaling group does not provide enough instances to satisfy this minimum healthy host requirement, CodeDeploy would report a `CAPACITY_ERROR` or `HEALTH_CONSTRAINT_VIOLATION`. This error indicates that the deployment cannot proceed safely due to insufficient available capacity, which is distinct from individual instances failing deployment steps and exceeding a failure threshold.

  • ✓

    The number of instances that failed deployment exceeded the configured failure threshold.

    Why this is correct

    CodeDeploy allows you to define a deployment configuration that specifies the maximum number or percentage of instances that can fail during a deployment before the entire deployment is halted. When individual instances within a deployment group encounter issues during any lifecycle event (e.g., script execution failures, application startup errors, or health check failures), their deployment status is marked as failed. If the cumulative count of these failed instances surpasses the predefined failure threshold set in the deployment configuration, CodeDeploy will automatically stop the deployment and mark its overall status as failed, indicating that too many targets could not successfully complete the update.

About these practice questions

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