capabilities.work

Tear Down a Service

A 3-step recipe with Amazon Fargate. We can help you get access.

Recipe · 3 steps

Tear Down a Service

Drain a service to zero tasks and then delete it.

  1. Update the service desired count to zero so its tasks drain.
  2. Poll DescribeServices until the running count reaches zero, re-entering while tasks are still draining.
  3. Delete the now-drained service from the cluster.
What you'll need to have ready
  • cluster: Name or ARN of the cluster hosting the service.
  • service: Name or ARN of the service to tear down.
For your developer

Arazzo workflow amazon-fargate:teardown-service, 3 operations: updateService → describeServices → deleteService. Specs on APIs.io.