4

I'm very new to Amazon ECS, and I've written a task definition with 3 containers. One for my php application (main-server), second for node application (pubsub-server) and a redis container.

main-server and pubsub-server link to redis container. (Is this the best way to arrange the containers?)

The cluster runs well. However, I have an update to make in my main-server. I am able to push the updated image to Amazon ECR but my changes don't reflect on the cluster. Is there any additional step to perform to run the updated container on push?

I have tried deregistering the tasks and activating them back. But it doesn't seem to work.

Please let me know if I need to provide anymore details.

Vishal Sharma
  • 2,550
  • 1
  • 23
  • 40
  • seems to me your question relates to http://stackoverflow.com/questions/31485031/ecs-service-automating-deploy-with-new-docker-image and http://stackoverflow.com/questions/34819201/how-to-ensure-to-update-docker-image-on-aws-ecs?rq=1 – NiL Feb 14 '17 at 14:02
  • You don't update containers. You deploy an updated image. – Raedwald Sep 24 '19 at 18:31
  • Possible duplicate of [ECS Service - Automating deploy with new Docker image](https://stackoverflow.com/questions/31485031/ecs-service-automating-deploy-with-new-docker-image) – Raedwald Sep 24 '19 at 18:31

1 Answers1

2

You need to force a new deployment.
From the AWS console, update the service definition and check the force new deployment checkbox on the first page, then skip to confirmation page.

From CLI:

aws ecs update-service --cluster [cluster arn] --service [service arn] --force-new-deployment 
Giulio Caccin
  • 2,962
  • 6
  • 36
  • 57