I terminated an AWS EC2 instance because I incorrectly created it. I've read that this deletes an instance, but it keeps reinstantiating itself. How do I permanently and fully remove the EC2 instance as though it had never existed?
3 Answers
If it's reinstantiating itself then you've probably got it in an auto-scaling group. Delete that auto-scaling group (or reduce the minimum instance count to zero).

- 7,993
- 31
- 26
It depends on how the instance was created in the first place.
If the instance was created with OpsWorks, then please see:
http://docs.aws.amazon.com/opsworks/latest/userguide/workinginstances-delete.html
Otherwise, have a look please make sure that
DeleteOnTermination
is set to true. More documentation about this can be found at:
http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/terminating-instances.html
towards the bottom of the page.

- 2,809
- 1
- 22
- 26
I found that I'd deployed an app on Elastic Beanstalk, and forgotten about it. And so even after deleting the static IP that was assigned and thinking that I'd finally found the issue, next time I logged on it had reinitialised again.
Deleting the app on Beanstalk is what (third time lucky) finally stopped it reinitialising a new EC2 instance.

- 1
- 1
-
It’s because beanstalk uses asg – ALex_hha Jan 27 '18 at 07:40