By using AWS re:Post, you agree to the AWS re:Post Terms of Use

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

2 minute read
0

I terminated my container instance in Amazon Elastic Container Service (Amazon ECS), but my instance still appears as a resource in my Amazon ECS cluster.

Short description

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

Resolution

Note: If you receive errors when you run AWS Command Line Interface (AWS CLI) commands, then see Troubleshoot AWS CLI errors. Also, make sure that you're using the most recent AWS CLI version.

When you deregister a stopped container instance, the instance no longer appears as a resource in your cluster. To deregister your container instance that's in the STOPPED state, use the Amazon ECS console or AWS CLI.

To troubleshoot a disconnected ECS agent, see How do I troubleshoot a disconnected Amazon ECS agent?

Related information

Amazon EC2 container instances for Amazon ECS

Installing the Amazon ECS container agent

Launching an Amazon ECS Linux container instance

Amazon ECS container agent configuration

AWS OFFICIAL
AWS OFFICIALUpdated 6 months ago