When I update or enter my credentials to a private image repository in the ECS agent, I receive the error “image <image_name> not found”.

This error can occur if the image location is incorrect, or if authentication credentials are incorrect or haven’t been entered. If credentials have been changed or provided, the ECS agent must be restarted.

In order for the container agent to be able to read the updated credentials for private repositories, a restart of the ECS agent is required.

You can update authorization credentials by updating the ECS_ENGINE_AUTH_TYPE and ECS_ENGINE_AUTH_DATA parameters. For more information and example values, see Amazon ECS Container Agent Configuration.

After you update the options, you can restart the ECS agent if you are using an ECS-optimized AMI by running these commands in the container instance’s shell:

$ sudo stop ecs

$ sudo start ecs

If you are not using an ECS-optimized instance, these steps do not apply. Follow the steps at Manually Updating the Amazon ECS Container Agent (for Non-Amazon ECS-optimized AMIs).

Note: If the ECS agent option ECS_DATADIR isn’t used, ECS does not track whether the agent has been run before on the container instance. When the agent is restarted, it performs a new registration to the cluster, which will assign a new container instance ID, and it might attempt to start new containers in any configured ECS services. As a best practice, replace the existing container instance with a new container instance that has the new ECS_ENGINE_AUTH_* options rather than modifying existing container instances.

Amazon EC2 Container Service (Amazon ECS), private repository, credentials

Did this page help you? Yes | No

Back to the AWS Support Knowledge Center

Need help? Visit the AWS Support Center

Published: 2016-08-04