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?
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With