user1072692 :
On whichever node you're using to control your docker swarm, log into ECR and pull the latest image, with this command: eval $(aws ecr get-login --no-include-email --region <whatever-your-region-is>)\n\nThis will log in to your ECR registry. Note that you'll need to add your AWS access key and secret key to this node for this to work; if you haven't done this already, do so with the aws configure command.\n\nNow, when you run docker stack deploy to start your container(s), add the --with-registry-auth flag to the command: this \"spreads\" the login to all the nodes in your swarm so they can all download the image.",
2017-07-20T19:03:27