Home > front end >  how to set the parameter aws ecs update-service -DeploymentConfiguration_MinimumHealthyPercent XX?
how to set the parameter aws ecs update-service -DeploymentConfiguration_MinimumHealthyPercent XX?

Time:12-06

there are 2 documents

1 https://docs.aws.amazon.com/powershell/latest/reference/items/Update-ECSService.html

2 https://awscli.amazonaws.com/v2/documentation/api/latest/reference/ecs/update-service.html

In the first document I understand how to specify the parameter "-DeploymentConfiguration_MinimumHealthyPercent 50 "

The second document does not tell me how to do it

this example works:

Update-ECSService -Cluster $Cluster -Service $Service -ForceNewDeployment 1 -HealthCheckGracePeriodSecond 1200 -DeploymentConfiguration_MinimumHealthyPercent 50 

How do I do the same thing through the AWS CLI?

aws ecs update-service --cluster $cluster --service $service --force-new-deployment --health-check-grace-period-seconds 1200 ( -DeploymentConfiguration_MinimumHealthyPercent 50 ???)

could you please tell me how to set the parameter ?

aws ecs update-service -DeploymentConfiguration_MinimumHealthyPercent XX

CodePudding user response:

You can set the minimumHealthyPercent value as part of --deployment-configuration argument:

aws ecs update-service --cluster $cluster \
--service $service \
--force-new-deployment \
--health-check-grace-period-seconds 1200 \
--deployment-configuration "maximumPercent=100,minimumHealthyPercent=50,deploymentCircuitBreaker={enable=boolean,rollback=boolean}"
  • Related