Amazon Elastic Container Service Agent
17.4 MB
6 months ago
Last update
6 months ago
6 months ago
6 months ago
6 months ago
6 months ago

Amazon Elastic Container Service Agent

This image is meant to be run on Amazon EC2.

Running this image outside of Amazon EC2 is not supported and likely will not work due to reliance on the Amazon EC2 Metadata Service, among other reasons.


The latest tag should always have the latest stable version of the agent. There are also tags corresponding to each release version of the format vX.Y.Z, e.g. v1.1.0.


You may find additional documentation for this image in the Amazon ECS Documentation.

If you are running the Amazon ECS Optimized AMI then you should run the ECS Agent via start ecs.

When running directly via Docker, the image must be able to access the host's Docker daemon to operate correctly. The recommended way to do this is to bindmount in Docker's socket, similar to the command below:

docker run --name ecs-agent -d -v /var/run/docker.sock:/var/run/docker.sock -v /var/log/ecs/:/log -v /var/lib/ecs/data:/data -p -e ECS_LOGFILE=/log/ecs-agent.log -e ECS_LOGLEVEL=info -e ECS_DATADIR=/data amazon/amazon-ecs-agent:latest

The full list of environment variables that you may edit can be found on the Agent's Github page.


If you are using the Amazon ECS Optimized AMI, you should follow the instructions documented here.

Otherwise, you can update to the latest agent on Dockerhub by running the following:

docker stop ecs-agent
docker rm ecs-agent
docker pull amazon/amazon-ecs-agent:latest

You should then follow the "Usage" instructions to re-run it.

Source code

Source code is available in the related Github repository:


Issues should be reported on the Github issues page.