Stop ECS cluster temporarily

Viewed 15635

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?

4 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

You can use the "Scheduled Actions" feature of Auto Scaling Groups. Starts similar to Kerem Baydoğan's answer From EC2 Management Console:

1 Click Auto Scaling Groups from the left menu.

2 Select the group from the list.

3 Select "Scheduled Actions" from the bar that appeared in the lower middle of the screen.

4 Click on create scheduled action

5 Fill the fields as you see fit and notice that under recurrence there is also a cron option for extra flexibility.

Related