Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Stop ECS cluster temporarily

I want to stop EC2 instances after office hours to save costs. How can I do the same with ECS instances? Even if I stop all tasks/services, the instance is still there? Do I stop the EC2 instance directly?

like image 963
Jiew Meng Avatar asked Aug 15 '17 14:08

Jiew Meng


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 you pause fargate?

Fargate does not allow you to stop the cluster because there are no underlying EC2 instances that you control to stop. Resources are provisioned in a "serverless" way so you don't have to deal with the underlying resources.


1 Answers

From EC2 Management Console

  1. Click Auto Scaling Groups from the left menu.
  2. Select the group from the list.
  3. Click edit on the details tab.
  4. Set desired property to '0'.

After clicking save it is all done.

The Auto Scaling Group is smart enough to shut down all instances.

enter image description here

like image 127
Kerem Baydoğan Avatar answered Oct 17 '22 06:10

Kerem Baydoğan