Amazon ECS limits and service quotas
An ECS cluster can hold 5,000 services, each service can run 5,000 tasks, a task definition can contain 10 containers and be at most 64 KiB, and a service can attach 5 target groups; none of these can be raised. Accounts can create 10,000 clusters per Region (adjustable). How fast tasks start is limited too: the service scheduler launches up to 500 tasks per service per minute on Fargate in most Regions, and Fargate itself has separate vCPU and launch-rate quotas.
Resource quotas
| Quota | Default | Adjustable |
|---|---|---|
| Clusters per account | 10,000 | Yes |
| Services per cluster | 5,000 | No |
| Tasks per service (desired count) | 5,000 | No |
| Container instances per cluster | 5,000 | No |
| Containers per task definition | 10 | No |
| Task definition size | 64 KiB | No |
| Revisions per task definition family | 1,000,000 | No |
| Capacity providers per cluster | 20 | No |
| Target groups per service (ALB or NLB) | 5 | No |
| Classic Load Balancers per service | 1 | No |
| Tags per resource | 50 | No |
| Tasks per service using service discovery | 1,000 (Cloud Map limit) | Via Cloud Map |
Deregistering a task definition revision does not free a slot in the one-million revision count, so a pipeline that registers a revision on every commit will never hit it in practice, but there is no way to reset it either.
Launch-rate quotas
| Quota | Default | Notes |
|---|---|---|
| Tasks launched per service per minute on Fargate | 500 (125 in Regions launched after 20 May 2025) | Service scheduler, not adjustable |
| Tasks launched per service per minute on EC2 or external | 500 | Not adjustable |
| Fargate On-Demand burst / sustained launch rate | 100 tasks / 20 per second | AWS Fargate quotas, adjustable |
| Fargate On-Demand vCPU count | 6 on new accounts | AWS Fargate quotas, adjustable |
Real launch speed is usually lower than these numbers because image pulls, health checks and load balancer registration all take time. A service scaling from 50 to 2,000 tasks will take several minutes even within quota; plan scaling policies around that.
Symptoms when you hit them
- Fargate vCPU quota: tasks fail to start with a reason saying you've reached the limit on the number of vCPUs you can run concurrently. Request more under AWS Fargate in Service Quotas; see Fargate limits.
- Tasks per service:
UpdateServicewith a desired count above 5,000 is rejected; split the workload into several services behind the same target group. - Container instances or capacity: on EC2, tasks stay pending with
RESOURCE:MEMORY,RESOURCE:CPUor port conflicts; see unable to place a task. - Task definition size: registration fails when environment variables and secrets push the JSON over 64 KiB; move configuration to
environmentFilesin S3 or to Parameter Store. - API throttling: many concurrent deploys can hit control-plane rate limits such as
UpdateServiceandRunTask; the SDKs retry, but CI jobs that run in parallel should stagger.
Check what you are using
# Services in a cluster and the largest desired count
aws ecs list-services --cluster prod --query 'length(serviceArns)'
aws ecs describe-services --cluster prod --services web api worker \
--query 'services[].{name:serviceName,desired:desiredCount,running:runningCount}' --output table
# ECS and Fargate quotas with their codes
aws service-quotas list-service-quotas --service-code ecs --query "Quotas[].[QuotaName,Value]" --output table
aws service-quotas list-service-quotas --service-code fargate --query "Quotas[].[QuotaName,QuotaCode,Value]" --output tabledescribe-services accepts up to 10 services per call.
Designing around the fixed limits
- Use separate clusters for separate teams or environments rather than packing thousands of services into one.
- Keep sidecars few: 10 containers per task includes log routers, proxies and agents.
- Use
environmentFilesandsecretsreferences instead of inlining large configuration in the task definition. - For huge fleets, several services sharing a target group behave like one service to clients.
Questions
How many tasks can an ECS service run?
5,000 tasks per service (the maximum desired count). It cannot be raised; use several services if you need more.
How many containers can an ECS task definition have?
Up to 10 container definitions per task definition.
Where do I find Fargate quotas?
In Service Quotas under AWS Fargate, not under Amazon ECS. They include the On-Demand and Spot vCPU counts and launch rates.
ECS quota problems usually appear as a deployment that stalls with tasks that never start. CloudConsole, a phone app for AWS, is being built to show ECS service events and alarms on your phone so you can see why.
About the app → · Download on the App Store