skip to Main Content

We have an ecs task that looks for an image with the :latest tag and deploys that image into our cluster.

One of the :latest images were problematic so we deleted it hoping aws might be smart enough to tag the previous image with :latest

However it wasn’t. Will our current task fail to run now that it cannot find an image with the tag :latest?

Thanks

2

Answers


  1. If the node hosting the task or the task itself stopped/failed for whatever reason, ECS will try to spawn another task on a node and if that node has no locally cached copy of the docker image, that node will try to download the image from ECR and would fail because there’s no image tagged as :latest.

    Login or Signup to reply.
  2. You can download the previous image, tag it with :latest and push again.

    Alternate is to update the Task Definition where the container image is referred for the container.

    No ECS doesn’t do it automatically because that’s might not be what everyone wants or is a standard in anyway. Every image is unique and rollback to previous image might be a wrong requirement. That’s why it’s not a default behaviour. ECS Task Definition Image documentation is here: https://docs.aws.amazon.com/AmazonECS/latest/developerguide/task_definition_parameters.html#container_definition_image

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search