aws ecs ai_generated true

service unable to place tasks: reason: no container instances available

ID: aws/ecs-service-unable-to-place

Also available as: JSON · Markdown
90%Fix Rate
92%Confidence
50Evidence
2023-01-01First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
any active

Root Cause

ECS cannot schedule tasks because there are no EC2 instances with enough resources or the cluster has no instances.

generic

Workarounds

  1. 93% success Scale up the Auto Scaling Group or add capacity providers
    Increase ASG desired count or use Fargate capacity provider

    Sources: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-capacity-providers.html

  2. 90% success Check task resource requirements (CPU/memory) vs instance capacity
    Task definitions may request more resources than instance types provide

Dead Ends

Common approaches that don't work:

  1. Increasing the desired count further 80% fail

    More tasks compete for the same insufficient resources

  2. Terminating and relaunching the ECS service 75% fail

    Service recreates but the capacity problem remains

Error Chain

Frequently confused with: