Stop ECS cluster temporarily

后端 未结 4 1690
伪装坚强ぢ
伪装坚强ぢ 2021-02-05 11:57

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 sto

相关标签:
4条回答
  • 2021-02-05 12:06

    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.

    0 讨论(0)
  • 2021-02-05 12:09

    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.

    0 讨论(0)
  • 2021-02-05 12:15

    Yes, just stop the EC2 instance directly. When you start the instance again during office hours, the ECS agent will make the services start according to their desired value.

    We are doing the same thing and it works for us.

    0 讨论(0)
  • 2021-02-05 12:21

    If you have the cluster set to a minimum number of nodes with an asg. If you turn off the nodes the asg will start another node to bring it up to three minimum number of nodes. You must set the asg to zero nodes.. Then turn off the current nodes.

    0 讨论(0)
提交回复
热议问题