ECS task definition with a container not marked essential
What it checks
ECS task definition with a container not marked essential
Where it applies
Terraform: aws_ecs_task_definition
CloudFormation: AWS::ECS::TaskDefinition
How to fix it
- If no container in the task definition is essential: mark the container whose exit should stop the task essential = true, or remove its essential = false. AWS requires at least one essential container in every task.
- If this is a log or metrics agent sidecar beside an essential application container: keep essential = false when the task should keep running after the sidecar stops. A non-essential container's failure does not affect the other containers in the task.
Frameworks
- AWS Well-Architected REL.5
These mappings are advisory, not an attestation of compliance.