AWS Tools for PowerShell - Amazon EC2 Container Service

From DevOps Notebook
Revision as of 21:35, 26 August 2020 by MilosZ (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Update ECS number of tasks

Update-ECSService -Cluster <cluster name> -DesiredCount <number of wanted tasks> -TaskDefinition <task definition> -Service <name of service>

example on how to increase and decrease number of aws ecs tasks:

Update-ECSService -Cluster WebGateway -DesiredCount 6 -TaskDefinition WebGateway -Service WebGateway
Start-Sleep -s 180
Update-ECSService -Cluster WebGateway -DesiredCount 3 -TaskDefinition WebGateway -Service WebGateway