Deleting an Amazon ECS service using the console - Amazon Elastic Container Service

Deleting an Amazon ECS service using the console

You can delete an Amazon ECS service using the console. The service is automatically scaled down to zero before it is deleted. Load balancer resources or service discovery resources associated with the service are not affected by the service deletion. To delete your Elastic Load Balancing resources, see one of the following topics, depending on your load balancer type: Delete an Application Load Balancer or Delete a Network Load Balancer.

When you delete a service, if there are still running tasks that require cleanup, the service status moves from ACTIVE to DRAINING, and the service is no longer visible in the console or in the ListServices API operation. After all tasks have transitioned to either STOPPING or STOPPED status, the service status moves from DRAINING to INACTIVE. Services in the DRAINING or INACTIVE status can still be viewed with the DescribeServices API operation.

Important

If you attempt to create a new service with the same name as an existing service in either ACTIVE or DRAINING status, you'll receive an error.

To delete a service (Amazon ECS console)
  1. Open the console at https://console.aws.amazon.com/ecs/v2.

  2. On the Clusters page, select the cluster for the service.

  3. On the Clusters page, choose the cluster.

  4. On the Cluster : name page, choose the Services tab.

  5. Select the services, and then choose Delete.

  6. To delete a service even if it wasn't scaled down to zero tasks, select Force delete service.

  7. At the confirmation prompt, enter delete, and then choose Delete.