- Newest
- Most votes
- Most comments
When an ECS service is deleted, it transitions from ACTIVE to DRAINING state while it cleans up resources. This is normal behavior, especially for Express Mode services which have many associated resources like load balancers, target groups, security groups, and auto-scaling policies.
For Express Mode services specifically, when you delete the service, it enters the DRAINING state where existing tasks complete current requests without starting new tasks. After all tasks stop, the service and infrastructure are permanently removed.
Even though you've deleted the cluster and can't see the service listed in the console or via ListServices API, the service is still in the cleanup process. Services in DRAINING or INACTIVE status won't appear in the console or ListServices results, but they can still be viewed using the DescribeServices API operation.
For troubleshooting this situation:
-
You can check the status using the DescribeServices API to see if there are any resources still being deprovisioned.
-
If the service is stuck in DRAINING, it might be due to:
- Resources that are still being cleaned up
- Insufficient IAM permissions for cleanup
- Network connectivity issues
- Resource dependencies that need to be resolved
- For Express services specifically, you can monitor the deletion progress in the console, which should show a list of resources that have been removed and those that may require manual cleanup.
Regarding costs, once the service is in DRAINING state and no tasks are running, you shouldn't incur costs for the compute resources. However, any persistent resources that haven't been fully cleaned up might still generate charges.
If the service remains stuck in DRAINING for an extended period (more than 24 hours), you may need to contact AWS Support for assistance, as there might be underlying issues preventing the complete cleanup of resources.
Sources
Troubleshooting Amazon ECS Express Mode services - Amazon Elastic Container Service
DeleteExpressGatewayService - Amazon Elastic Container Service
Delete Amazon ECS Express Mode services - Amazon Elastic Container Service
DeleteService - Amazon Elastic Container Service
Hi,
Even if an ECS service appears to be in a Draining state, once the cluster and service have been deleted and no tasks remain, there is no ongoing cost associated with that state. The Draining status simply indicates that ECS was in the process of shutting down any previously running tasks. After the service and cluster are removed, the backend will automatically clean up whatever remains. Seeing “Draining” temporarily does not mean that AWS is still charging you for ECS compute resources.
That said, it’s still important to verify that no other related AWS resources remain active. For example, if you were using the EC2 launch type, EC2 instances might still exist. If you were using Fargate but all tasks are gone, then there are no charges from ECS. Independently managed resources—such as load balancers, target groups, NAT gateways, EIPs, or RDS instances—can continue to incur charges even after deleting ECS resources, so these should also be reviewed in the console.
In summary, if the cluster is gone, the service no longer exists, and there are no tasks running or listed, ECS will not generate any further cost. The Draining state you saw is just a leftover status from the deletion process and will clear on its own. There is no action required and no risk of ongoing ECS charges.
Thx.
Relevant content
asked 4 years ago
asked 4 years ago
- AWS OFFICIALUpdated 7 months ago
