Why is the Amazon ECS container instance that I terminated still registered with its cluster?

1 minute read

I terminated my container instance in Amazon Elastic Container Service (Amazon ECS), but my container instance still appears as a resource in my Amazon ECS cluster. How can I remove this container instance from my cluster?

Short description

If you terminate a RUNNING container instance with a connected Amazon ECS container agent, the agent automatically deregisters the instance from your cluster. However, if you terminate a STOPPED container instance with disconnected agents, the container instance isn't automatically removed from the cluster.


Deregister your container instance in the STOPPED state by using the Amazon ECS console or AWS Command Line Interface.

The deregistered container instance will no longer appear as a resource in your Amazon ECS cluster.

To troubleshoot a disconnected ECS agent see Why are my Amazon ECS container instances with Amazon Linux 2 AMIs disconnected?

Related information

Amazon ECS container instances

Installing the Amazon ECS container agent

Launching an Amazon ECS container instance

Amazon ECS container agent configuration

AWS OFFICIALUpdated 5 years ago