Search code examples
amazon-web-servicesamazon-ecs

ECS Task Definition Update Not Triggering Deployment


When I update the task definition for one of my ECS services, the service does not re-deploy with the new task definition until I run aws ecs update-service ... --force-new-deployment. Is there some kind of configuration option that controls this behaviour? I've noticed that some of my services do re-deploy when I update the Task Definition, but others don't and I'm not sure why that is.

I've provisioned my infrastructure with terraform.


Solution

  • You need to set the force_new_deployment setting in the aws_ecs_service resource in your Terraform code.