0

I am running an ECS Fargate service with deploymentController as CODE_DEPLOY. Now, when I --force-new-deployment using aws cli.

AWS CLI Command

aws ecs update-service --cluster my-cluster --service my-service --force-new-deployment

I get following error. An error occurred (InvalidParameterException) when calling the UpdateService operation: Cannot force a new deployment on services with a CODE_DEPLOY deployment controller. Use AWS CodeDeploy to trigger a new deployment.

Even in the docs it's not mentioned regariding teh update scenarios https://docs.aws.amazon.com/cli/latest/reference/ecs/update-service.html Is there any workaround this?

power-cut
  • 1,310
  • 1
  • 14
  • 30
  • Why aren't you using codedeploy to do this, since that's what you set up for deployments? – Robert Hafner Jul 13 '23 at 23:36
  • @RobertHafner True. So in the new ECS console `CODEDEPLOY` is not supported. Also, when I use classic console, we can force deploy from the UI and it triggers deployment in codedeploy. I don't get why CLI doesn't support force deployment, because that's what I was under the impression with. – power-cut Jul 13 '23 at 23:41

1 Answers1

2

You are using CodeDeploy to manage deployments and not Amazon ECS. In the AWS Classic Console, the forced deployment option uses Code Deploy behind the scenes
At the moment ecs-cli does not support the forced deployment feature for Code Deploy deployment controller

Piyush Mattoo
  • 15,454
  • 6
  • 47
  • 56