Difference between revisions of "Aws ecs update-service"

From wikieduonline
Jump to navigation Jump to search
Line 10: Line 10:
 
* Stop service: <code>[[aws ecs]] update-service --cluster your_cluster_name --service [[your_service-name]] [[--desired-count]] 0</code>
 
* Stop service: <code>[[aws ecs]] update-service --cluster your_cluster_name --service [[your_service-name]] [[--desired-count]] 0</code>
  
 +
* Stop all services:
 
{{stop all services from a cluster}}
 
{{stop all services from a cluster}}
  

Revision as of 09:44, 27 April 2023

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

Restart ECS service:

--foce-new-deployment can be used to trigger a new deployment with no service definition changes
  • Stop all services:
for SERVICES in $(aws ecs list-services --cluster your-cluster | grep YOUR-TEXT | grep . |  cut -d":" -f6- | cut -d'"' -f1 | cut -d"/" -f3); do
aws ecs update-service --cluster your-cluster --service $SERVICES --desired-count 0; done

Synopsis

update-service
[--cluster <value>]
--service <value>
[--desired-count <value>]
[--task-definition <value>]
[--capacity-provider-strategy <value>]
[--deployment-configuration <value>]
[--network-configuration <value>]
[--placement-constraints <value>]
[--placement-strategy <value>]
[--platform-version <value>]
[--force-new-deployment | --no-force-new-deployment]
[--health-check-grace-period-seconds <value>]
[--enable-execute-command | --disable-execute-command]
[--enable-ecs-managed-tags | --no-enable-ecs-managed-tags]
[--load-balancers <value>]
[--propagate-tags <value>]
[--service-registries <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]


Errors

Related

See also

Advertising: