SAP-C02 Continuous Improvement for Existing Solutions Practice Question
A company uses Amazon ECS with Fargate launch type for a web application. During deployments, the new tasks fail health checks and the deployment rolls back. What should the team do to identify why the new tasks are failing?
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
✓
View the stopped task logs in Amazon CloudWatch Logs.
When tasks fail health checks and are stopped, their logs are sent to CloudWatch Logs (if configured). Viewing the stopped task logs reveals application errors that caused the health check failure. Option B is incorrect because misconfigured environment variables would likely affect the old running tasks as well; the issue is specific to new tasks, so the task definition is probably fine. Option C is incorrect because the ECS service event stream shows deployment events (like rollback triggers) but not the detailed error logs of the failing tasks. Option D is incorrect because ECS Exec requires the task to be running; since the tasks are failing health checks and stopping, ECS Exec cannot connect to them.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
View the stopped task logs in Amazon CloudWatch Logs.
Why this is correct
Stopped tasks send logs to CloudWatch, revealing failure reasons.
- ✗
Review the task definition for misconfigured environment variables.
Why it's wrong here
The old tasks work, so task definition is not the issue.
- ✗
Check the ECS service event stream for error messages.
Why it's wrong here
Service events show deployment status, not application errors.
- ✗
Use ECS Exec to connect to the failing tasks and debug.
Why it's wrong here
ECS Exec requires the task to be in running state.
Go deeper
Related to this question
About these practice questions
One of 1,660 original SAP-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 →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This SAP-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 SAP-C02 exam.