The maximum number of capacity providers per cluster has been exceeded

From wikieduonline
Jump to navigation Jump to search

Amazon allows to create a maximum of 10 capacity providers per cluster, and cannot be increased.[1] If you try to create a new capacity provider and have exceed the limit you will get the following error: the maximum number of capacity providers per cluster has been exceeded


Check if your capacity provider is in use by an Amazon ECS service in the capacity provider strategy[edit]

https://aws.amazon.com/premiumsupport/knowledge-center/ecs-capacity-provider-error/

#!/bin/bash
cluster=clustername 
capacityprovider=capacityprovidername
services=$(aws ecs list-services --cluster ${cluster} | jq --raw-output '.serviceArns[]')
aws ecs describe-services \
    --cluster ${cluster} \
    --services ${services} \
    | jq -r --arg capacityprovider "${capacityprovider}" \
    '.services[] | select(.capacityProviderStrategy[]?.capacityProvider == $capacityprovider) | .serviceName'


aws ecs describe-clusters --cluster mycluster | jq '.clusters[].defaultCapacityProviderStrategy'

Related[edit]

Activities[edit]

See also[edit]

  • https://docs.aws.amazon.com/AmazonECS/latest/developerguide/service-quotas.html
  • Advertising: