title: How to ensure to update Docker image on AWS ECS?
body: <p>I use Docker Hub to store a private Docker image, the repository has a webhook that once the image is updated it calls a service I built to:</p>
  
  <ul>
  <li>update the ECS task definition</li>
  <li>update the ECS service</li>
  <li>deregister the old ECS task definition</li>
  </ul>
  
  <p>The service is running accordingly. After it runs ECS creates a new task with the new task definition, stops the task with the old task definition and the service come back with the new definition. </p>
  
  <p>The point is that the Docker Image is not updated, once the service starts in the new task definition it remains with the old image. </p>
  
  <p>Am I doing something wrong? How o ensure the docker image is updated? </p>