Deleting a Service
You can delete a service if you have no running tasks in it and the desired task count is zero. If the service is actively maintaining tasks, you cannot delete it, and you must update the service to a desired task count of zero. For more information, see Updating a Service.
When you delete a service, if there are still running tasks that require cleanup,
the service status moves from
DRAINING, and the service is no longer visible in the console
ListServices API operations. After the tasks have stopped,
then the service status moves from
INACTIVE. Services in the
INACTIVE status can still be viewed with
DescribeServices API operations; however, in the future,
INACTIVE services may be cleaned up and purged from Amazon ECS
record keeping, and
DescribeServices API operations on those
services will return a
Use the following procedure to delete an empty service.
To delete an empty service
Open the Amazon ECS console at https://console.aws.amazon.com/ecs/.
On the navigation bar, select the region that your cluster is in.
In the navigation pane, choose Clusters.
On the Clusters page, select the name of the cluster that your service resides in.
On the Cluster :
namepage, choose Services.
Check the box to the left of the service to update and choose Delete.
Your service must have zero desired or running tasks before it can be deleted.
Choose Yes, Delete to confirm your service deletion.