自动关机和启动Amazon EC2实例 [英] Auto Shutdown and Start Amazon EC2 Instance
问题描述
我可以自动启动和使用Amazon的API终止我的亚马逊实例?能否请您介绍了如何可以做到这一点?我的理想需要启动实例,每天停止实例以指定的时间间隔。
Can I automatically start and terminate my Amazon instance using Amazon API? Can you please describe how this can be done? I ideally need to start the instance and stop the instance at specified time intervals every day.
推荐答案
万一有人跌倒在这个咋老问题,现在你可以通过添加一个时间表,自动伸缩群达到同样的事情:增加实例的数量在自动定标组1在特定的时间和减少回0之后。
Just in case somebody stumbles on this ye old question, nowadays you can achieve the same thing by adding a schedule to an auto scaling group: increase the amount of instances in an auto scaling group to 1 at certain times and decrease it back to 0 afterwards.
和因为这个答案是获得了很多的意见,我想链接到这个一个非常有用的指南:重复性计划与自动缩放
And since this answer is getting a lot of views, I thought to link to a very helpful guide about this: Running EC2 Instances on a Recurring Schedule with Auto Scaling
这篇关于自动关机和启动Amazon EC2实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!