Skip to content

Delete ECS Capacity Provider

0

Hi all, i want to delete an old capacity provider, but it status is "update in progress" at least since last week. Anyone know if is it possible to interrupt that update? And, in case, how to do so?

here is what i try: aws ecs delete-capacity-provider --capacity-provider <capacity-provider-name> An error occurred (UpdateInProgressException) when calling the DeleteCapacityProvider operation: The capacity provider could not be deleted because a previous update is processing. Try again later.

i also list all services to check if it is still in use, but no one is using that capacity provider. regards

  • please accept the answer if it was useful

asked 2 years ago457 views

1 Answer
0

Ensure there are no ongoing updates or related ECS tasks that might be using the capacity provider. Sometimes, updates might be stuck due to issues with the underlying infrastructure or service.

aws ecs describe-capacity-providers --capacity-providers <capacity-provider-name>

Stop All ECS Services and Tasks Using the Capacity Provider. Ensure that there are no tasks or services indirectly tied to the capacity provider.

aws ecs list-tasks --cluster <cluster-name> --query 'taskArns[]'
aws ecs list-services --cluster <cluster-name> --query 'serviceArns[]'

If the above steps do not work, contact AWS Support. This might be necessary if the capacity provider is stuck in an inconsistent state that cannot be resolved through regular API calls.

EXPERT

answered 2 years ago

EXPERT

reviewed 2 years ago

  • i use this command to list capacity providers associated with a service for all services in the cluster: aws ecs describe-services --cluster ec2-projects --services ${service} --query 'services[0].capacityProviderStrategy[*].capacityProvider'; but there is no services using that capacity provider. i suppose i need AWS Support, so.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.