Amazon Fargate · Arazzo Workflow
Amazon Fargate Tear Down a Service
Version 1.0.0
Scale a service to zero, wait for it to drain, then delete it.
Provider
Workflows
teardown-service
Drain a service to zero tasks and then delete it.
Chains updateService (desiredCount 0), a describeServices drain poll, and deleteService.
1
scaleToZero
updateService
Update the service desired count to zero so its tasks drain.
2
pollDrained
describeServices
Poll DescribeServices until the running count reaches zero, re-entering while tasks are still draining.
3
deleteService
deleteService
Delete the now-drained service from the cluster.