Why does my AWS EC2 Instance terminates when stopped?

喜你入骨 提交于 2019-12-03 09:44:56

问题


Everytime I stop my AWS EC2 instance, it terminates automatically with a few seconds. Additionally a new instance is created. Can anyone suggest why this would be happening?


回答1:


Because it is part of an Auto Scaling group.

According to AWS Support, it is normal behavior to Terminate an instance when you tell it to Stop if it is part of an Auto Scaling group. My Termination Protection was set to Stop but apparently it overrides this setting.

In order to Stop an instance that's part of a Auto Scaling group and NOT Terminate it, you must Detach it from the Auto Scaling group before stopping it: http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/detach-instance-asg.html

I just went through this




回答2:


You can choose the shutdown behavior of your EC2 instance when creating it.

Selecting some options will default and/or force you to termination on stop.

See EC2's documentation for more information.

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html



来源:https://stackoverflow.com/questions/19194893/why-does-my-aws-ec2-instance-terminates-when-stopped

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