AWS ECS Task Failing
Start with the task stop reason, then follow the container startup path.
Diagnose
- Inspect ECS task and container stop reasons.
- Check application logs before changing infrastructure.
- Verify image, command, environment, secrets, and IAM role.
- Validate network access to dependencies.
- Check container health checks and deployment configuration.
- If capacity is involved, inspect the underlying compute and scheduling signals.
Fix → Verify → Prevent
Make the smallest confirmed correction, redeploy, and observe the service through a complete deployment cycle. Keep stop reasons and rollback steps in the operational runbook.