Courseiva
Development with AWS ServiceshardMultiple ChoiceObjective-mapped

DVA-C02 Development with AWS Services Practice Question

A company is using AWS CodeDeploy to deploy an application to an Auto Scaling group. The deployment fails with 'The overall deployment failed because too many individual instances failed deployment, too few healthy instances are available for deployment, or some instances in your deployment group are experiencing problems.' The developer wants to identify the specific error on a failed instance. Which AWS CLI command should the developer use?

⚠ Common exam trap

It's easy for candidates to confuse `list-deployment-instances` (which only returns instance IDs) with `get-deployment-instance` (which returns detailed error data), leading them to choose the list command when they actually need the detailed diagnostic output.

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

aws deploy get-deployment-instance

The `aws deploy get-deployment-instance` command retrieves detailed information about a single instance in a deployment group, including the specific error messages and lifecycle event logs that caused the instance to fail. This allows the developer to diagnose the root cause of the failure on a particular instance, which is exactly what is needed when the overall deployment fails with a generic error message.

Answer analysis

Option-by-option breakdown

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

  • aws deploy get-deployment

    Why it's wrong here

    This command retrieves high-level information about a specific CodeDeploy deployment, such as its overall status (e.g., Succeeded, Failed), start time, end time, and associated application/deployment group details. While it indicates if the *entire* deployment failed, it does not provide granular, instance-specific status, detailed error messages, or lifecycle event hook failures for individual target instances. Therefore, it cannot pinpoint why a particular instance experienced a deployment issue.

  • aws deploy get-deployment-instance

    Why this is correct

    This command is specifically designed to retrieve comprehensive details for a single target instance within a CodeDeploy deployment. It provides the instance's lifecycle event status (e.g., BeforeInstall, Install, ApplicationStop), any associated error messages, and the instance's overall status within that deployment. This granular information is crucial for diagnosing why a deployment failed on a particular instance, offering insights into specific script failures or configuration issues.

  • aws deploy list-deployments

    Why it's wrong here

    This command returns a list of deployment IDs, optionally filtered by application name, deployment group name, or creation time. While useful for finding a specific deployment's ID, it provides no status information, error details, or any per-instance data. It merely serves as an index to retrieve deployment IDs, making it unsuitable for diagnosing deployment failures or understanding instance-level issues.

  • aws deploy list-deployment-instances

    Why it's wrong here

    This command retrieves a list of instance IDs that are part of a specific CodeDeploy deployment. It can be filtered by instance status (e.g., Succeeded, Failed, InProgress). However, it only provides the instance IDs and their high-level status within the deployment, without offering any detailed error messages, lifecycle event hook statuses, or specific reasons for failure on any individual instance. It's a discovery tool, not a diagnostic one.

About these practice questions

One of 724 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 by Johnson Ajibi, MSc IT Security

Senior Network & Security Engineer · founder of Courseiva

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.