DVA-C02 Troubleshooting and Optimization Practice Question
A company is using AWS CodePipeline for CI/CD. The pipeline has a build stage using AWS CodeBuild, and a deploy stage using AWS CodeDeploy. The deployment is failing with 'Error: Health checks failed'. Which TWO steps should the developer take to troubleshoot this issue? (Select TWO.)
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
✓
Verify that the target group's health check path and port are correctly configured.
Options A and C are correct. Verifying the target group's health check path and port (A) ensures that the load balancer's health check matches the application's actual endpoint, which is a common cause of health check failures. Checking the CodeDeploy deployment logs (C) provides detailed error messages from the deployment process, which can pinpoint why the health checks are failing. Option B (checking S3 bucket) is not directly related to health check failures, as artifacts are typically stored correctly if the build succeeded. Option D (checking CodeBuild logs) is irrelevant because the build stage succeeded. Option E (increasing instances) does not address the root cause of health check failures.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Verify that the target group's health check path and port are correctly configured.
Why this is correct
CodeDeploy's health check failures during an in-place or blue/green deployment are most often caused by the target group's health check path returning a non-2xx response or the port not matching what the application actually listens on, so confirming this configuration directly addresses the failure signal.
- ✗
Check the S3 bucket where the build artifacts are stored.
Why it's wrong here
By the time CodeDeploy reports a health check failure, CodeBuild has already produced and stored the artifact successfully in S3 and CodePipeline has passed it downstream, so inspecting the artifact bucket investigates a stage that already completed rather than the actual point of failure.
- ✓
Check the CodeDeploy deployment logs for detailed error messages.
Why this is correct
The CodeDeploy deployment logs on each instance, including the AppSpec lifecycle event output, record the exact command or health check that failed and why, giving far more actionable detail than the generic pipeline-level error message.
- ✗
Check the CodeBuild build logs for errors.
Why it's wrong here
The pipeline's build stage completed successfully since it advanced to the deploy stage; reviewing CodeBuild logs would only be useful if the failure were compilation or packaging related, which is not what 'Health checks failed' indicates here.
- ✗
Increase the number of EC2 instances in the Auto Scaling group.
Why it's wrong here
Adding more EC2 instances increases fleet capacity but does nothing to fix an application that fails its health check, such as a crashing process or a wrong listener port, so the same failure would simply repeat across the additional instances.
Quick reference
AWS S3 Storage Class Comparison
| Storage Class | Min Duration | Retrieval | Use Case |
|---|---|---|---|
| S3 Standard | None | Immediate | Frequently accessed data |
| S3 Standard-IA | 30 days | Immediate | Infrequent access, rapid retrieval |
| S3 One Zone-IA | 30 days | Immediate | Non-critical infrequent data |
| S3 Intelligent-Tiering | None | Immediate–hours | Unknown or changing access patterns |
| S3 Glacier Instant | 90 days | Milliseconds | Archive with instant retrieval |
| S3 Glacier Flexible | 90 days | Minutes–hours | Archive, flexible retrieval |
| S3 Glacier Deep Archive | 180 days | Hours | Long-term compliance archive |
Go deeper
Related to this question
About these practice questions
Courseiva writes every DVA-C02 question from scratch — 1,135 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 →
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.