Question 730
During a high-traffic holiday release at an e-commerce company, the DevOps team discovers that an ECS service repeatedly starts tasks that fail because the image pull role cannot access ECR. The affected workload supports checkout and order history; a sudden traffic spike can directly affect purchase completion. Which automation approach BEST satisfies this operational requirement?
Explanation
Correct Answer
Correct. Use ECS service events, stopped task reasons, container logs and load-balancer target health to isolate placement, start-up or application failures. The reported condition is that an ECS service repeatedly starts tasks that fail because the image pull role cannot access ECR. The design addresses the corresponding exposure: Replacing tasks repeatedly without finding the failure reason can exhaust capacity and prolong customer-visible errors. Its effectiveness must be demonstrated by this result: A controlled test identifies the actual placement or start-up error and demonstrates stable healthy tasks after the targeted correction.
Incorrect Answers
Use AWS Step Functions to coordinate multi-step asynchronous remediation with explicit retries, catch handlers, approvals and state tracking. That change would not implement ecs service and container failure diagnosis.
Use EC2 Auto Scaling lifecycle hooks, EventBridge and a suitable automation handler to complete configuration or registration checks before newly launched instances enter service. The configuration must instead establish ecs service and container failure diagnosis.
Attach an appropriate Systems Manager Automation remediation document to AWS Config findings with safe, least-privilege execution controls. The ecs service and container failure diagnosis prerequisite remains unaddressed.