Siye
Siye

Reputation: 39

Auto-created EC2 instance and how to delete(terminate) it?

I'm launching an EC2 instance in AWS. And there is an auto-created EC2 instance, named Test-env. Every time I terminated it, AWS would auto-created a new one for me. is there any way to terminate the auto-created instance and prevent it from creating a new one?

enter image description here

Shown in the picture above, I terminated the Test-env twice, and AWS just created a new Test-env for me.

Thank a lot.

Upvotes: 2

Views: 1074

Answers (3)

Luigi
Luigi

Reputation: 45

Other than Elastic Beanstalk and AutoScaling group,
another possibility is you have an on-going Spot Request.

You can cancel it in order to prevent the instance from recreating.
EC2 -> Instances -> Spot Requests
Then, Actions -> Cancel Request

Upvotes: 1

Suyash
Suyash

Reputation: 525

It seems that AutoScaling group configuration is present for the EC2 instance Test-env. Can you please check under EC2 -> AutoScaling Groups -> Test-env -> Scaling Policies?

It seems that ScaleUp Policy has been configured for that instance. It means that whenever total number of EC2 instances are less than or equal to 0 (or any limit which was set) then spawn new one.

You need to update these policies or remove it as per your need.

Upvotes: 0

Simos Fasouliotis
Simos Fasouliotis

Reputation: 1390

It seems like you have been using Elastic Beanstalk. If you open up that section of the AWS Management Console, you can delete the application/environment from there. This will bring down the instance as well. When you terminate the Elastic Beanstalk instance manually through the EC2 section, the system thinks that it has failed and will launch a replacement.

Reference: https://forums.aws.amazon.com/thread.jspa?threadID=115913

Upvotes: 4

Related Questions