Posted On: Oct 4, 2016

Amazon EC2 Container Service (Amazon ECS) now supports automated cleanup of stopped tasks and Docker images that are not being used by any tasks on your container instances.

Each time a task is placed on a container instance, the Amazon ECS agent checks to see if the images referenced in the task are the most recent of the specified tag in the repository; if not, it pulls the image from its respective repository. If you frequently update the images in your tasks and services - for example, as part of a continuous delivery pipeline - your container instance storage can quickly fill up with Docker images that you are no longer using and will likely never use again. Likewise, containers that belong to stopped tasks can also consume container instance storage with log information, data volumes, and other artifacts. The Amazon ECS agent now cleans up by default stopped tasks and Docker images.

Read more about task and image cleanup in the Amazon ECS documentation. Please visit our product page for more information about Amazon EC2 Container Service.