Search code examples
amazon-web-servicesamazon-ecs

Registered container instances less than Running service count?


The following shows one of the ECS clusters. It shows registered container has only 3 instances but the Running tasks use 6 EC2? How to understand these two numbers?

Cluster ARN arn:aws:ecs:us-east-2:312412556376:cluster/test-dev
Status ACTIVE
Registered container instances 3
Pending tasks count 0 Fargate, 0 EC2
Running tasks count 0 Fargate, 6 EC2
Active service count 0 Fargate, 6 EC2
Draining service count 0 Fargate, 0 EC2

Solution

  • Running tasks count 0 Fargate, 6 EC2

    This means that you have 0 tasks of type Fargate, and 6 tasks of type EC2. EC2 here is type of task, not number of instances.

    Since you have 3 container instances, this means each instance hosts 2 tasks.