- Newest
- Most votes
- Most comments
The capacity provider was created with Terraform. I don't know how the association was made and not visible in any way. But after the following AWS CLI command, the association became explicit and visible from the management console and from the AWS CLI.
aws ecs put-cluster-capacity-providers \
--cluster ecs-cluster-ffl \
--capacity-providers FARGATE FARGATE_SPOT my-provider \
--default-capacity-provider-strategy capacityProvider=FARGATE
Similar attempts did not work before as I did not have FARGATE and FARGATE_SPOT in capacity providers list. My understanding is that the operation failed then because since FARGATE was not specified in capacity providers list and was trying to remove FARGATE capacity provider which was being used.
According to the documentation https://docs.aws.amazon.com/AmazonECS/latest/developerguide/cluster-capacity-providers.html, A capacity provider must be associated with a cluster before being specified in a capacity provider strategy. If the cluster deletion fails with the error "updateStatus": "DELETE_FAILED", "updateStatusReason": "The capacity provider cannot be deleted because it is associated with cluster: my-cluster". Remove the capacity provider from the cluster and try again." Please delete the capacity provider under the "Capacity Providers" tab of the cluster.
Relevant content
- asked 5 months ago
- asked 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
Yes I was aware of that. However, the problem was that I wasn't able to see my capacity provider from from the cluster's 'Infrastructure' tab where the list of 'Capacity Providers' in the management console from my web browser nor the output of AWS CLI querying about ecs cluster.