Scheduling an existing AWS EC2 instance to start/stop [closed]

天大地大妈咪最大 提交于 2019-12-08 07:26:55

问题


Right now I am using the Auto Scaling Command Line Tool to launch a new EC2 instance once per day and run a script that terminates itself upon completion. Now I need to do the same thing with a different script, but this one requires several Python modules to be installed. Therefore, I would like to schedule the start/stop of a single, existing instance rather than the launch/termination of a brand new instance. I've scoured Amazon's documentation/blogs but I can't determine if this functionality is supported with Autoscaling. How could this be accomplished?


回答1:


Its not supported with autoscaling. If you want to keep doing what you are currently doing. You could install the python modules with a cloud init script.

You can also start/stop an existing instance with the command line tools, just not the autoscaling ones.




回答2:


My eventual solution was to set up an instance the way I wanted and then create an AMI from it. My autoscaling setup then starts/stops an instance of that AMI.



来源:https://stackoverflow.com/questions/21069899/scheduling-an-existing-aws-ec2-instance-to-start-stop

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!