# Mysterious amazon/amazon-ecs-agent containers

**URL:** <https://forums.suse.com/t/mysterious-amazon-amazon-ecs-agent-containers/3863>\
**Category:** General\
**Created:** [August 31, 2016, 6:04pm UTC](https://forums.suse.com/t/mysterious-amazon-amazon-ecs-agent-containers/3863 "2016-08-31T18:04:18Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![brianwallace](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@brianwallace](https://forums.suse.com/u/brianwallace)\
**Post date:** [August 31, 2016, 6:04pm UTC](https://forums.suse.com/t/mysterious-amazon-amazon-ecs-agent-containers/3863/1 "2016-08-31T18:04:19Z")

</div>

I an running a Rancher instance in AWS that is configured to run Amazon Linux AMIs (ami-7172b611 – it’s not an Amazon ECS-optimized AMIs). I have the cluster hosts configured via an autoscaling group.

For some reason which I can’t determine yet, I see dozens of stopped `amazon/amazon-ecs-agent` containers. Does anyone know where these could be coming from? I assume there is configuration somehwere that I accidentally ticked. See below for a screenshot.

 ![](https://us1.discourse-cdn.com/flex022/uploads/suse/original/2X/0/0899f1e7a482c432ce44c0a85834912e11776bb8.png)

Additional Environment Information:  
Rancher Server Version: 1.1.2  
envrironment: cattle  
docker version: 1.11

Thanks,

Brian

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [August 31, 2016, 7:21pm UTC](https://forums.suse.com/t/mysterious-amazon-amazon-ecs-agent-containers/3863/2 "2016-08-31T19:21:48Z")

</div>

Without having tried your AMI, my first guess would be an old container accidentally baked into the AMI and gets imported by the rancher/agent… each one would have the exact same container id, which would then confuse us as they are supposed to be unique even across hosts.

---

<div class="post-metadata">

**Author:** ![brianwallace](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@brianwallace](https://forums.suse.com/u/brianwallace)\
**Post date:** [August 31, 2016, 10:30pm UTC](https://forums.suse.com/t/mysterious-amazon-amazon-ecs-agent-containers/3863/3 "2016-08-31T22:30:08Z")

</div>

Interesting thought… I jumped on each of my docker cluster AMI instances and ran `docker ps -a` and `docker images -a`, but I did not see the expected reference to the `amazon/amazon-ecs-agent` container.

Any suggestion how to efficiently/programatically remove all these mystery `amazon/amazon-ecs-agent` containers from the Rancher webui? There are probably ~100 and they are quite distracting.

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [September 1, 2016, 5:07am UTC](https://forums.suse.com/t/mysterious-amazon-amazon-ecs-agent-containers/3863/4 "2016-09-01T05:07:59Z")

</div>

CLI, it’s only in 1.2 but should work against 1.1.x… [https://github.com/rancher/cli/releases](https://github.com/rancher/cli/releases)

Or I’m on my phone, but something resembling this in browser console:

```auto
s.all('container').filterBy('name','ecs-agent').forEach(function(c) { c.remove(); })

```

---

<div class="post-metadata">

**Author:** ![brianwallace](https://avatars.discourse-cdn.com/v4/letter/b/eada6e/32.png) [@brianwallace](https://forums.suse.com/u/brianwallace)\
**Post date:** [September 1, 2016, 10:06pm UTC](https://forums.suse.com/t/mysterious-amazon-amazon-ecs-agent-containers/3863/5 "2016-09-01T22:06:00Z")

</div>

Thanks for the pointers, @vincent!

I was able to use the rancher cli to remove the containers. Very slick!

BTW, where can one find the browser console. I did not know that existed and could not find it.

Thanks,

Brian

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [September 1, 2016, 10:21pm UTC](https://forums.suse.com/t/mysterious-amazon-amazon-ecs-agent-containers/3863/6 "2016-09-01T22:21:10Z")

</div>

I just meant the browser’s built-in developer tools console…
