AWS Certified DevOps Engineer – Professional (DOP-C02) — Question 216

A DevOps engineer manages a company's Amazon Elastic Container Service (Amazon ECS) cluster. The cluster runs on several Amazon EC2 instances that are in an Auto Scaling group. The DevOps engineer must implement a solution that logs and reviews all stopped tasks for errors.

Which solution will meet these requirements?

Answer options

Correct answer: A

Explanation

Option A is correct as it directly addresses the need to log and review stopped tasks by utilizing Amazon EventBridge and CloudWatch Logs Insights. Options B and C do not specifically capture task state changes, which is crucial for identifying errors in stopped tasks. Option D is focused on EC2 instance termination logs rather than the specific ECS tasks that have stopped.