Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I pause an ECS service instead of deleting it?

Tags:

Haven't been able to find this in docs. Can I just pause an ECS service so it stopped creating new tasks? Or do I have to delete it to stop that behavior?

I just want to temporarily suspend it from creating new tasks on the cluster

like image 408
red888 Avatar asked Mar 20 '18 22:03

red888


People also ask

What is Amazon Amazon ECS pause?

amazon/amazon-ecs-pause:0.1. 0 is used as part of the awsvpc networking mode, and for sharing pid and ipc namespaces; it's a mechanism to create a namespace that can be shared by multiple containers and is very similar to Kubernetes' use of "pause" containers for pod namespaces.

How do I run ECS task only once?

Open the Amazon ECS console at https://console.aws.amazon.com/ecs/ . In the navigation pane, choose Task Definitions and select the task definition to run. To run the latest revision of a task definition, select the box to the left of the task definition to run.


1 Answers

It is enough to set the desired number of tasks for a service to 0. ECS will automatically remove all running tasks.

aws ecs update-service --desired-count 0 --cluster "ecs-my-ClusterName" --service "service-my-ServiceName-117U7OHVC5NJP" 
like image 192
wasserholz Avatar answered Oct 11 '22 16:10

wasserholz