简体   繁体   中英

How to delete AWS EC2 instance? It keep coming back again

After terminating instance EC2 it's creating back new instance automatically. I'm using free AWS trial version and it is exceeding monthly limit.

This mimics the behaviour of an instance in an autoscaling group. Delete any autoscaling groups you have to ensure that no replacement instances will be created.

You can check this within the AWS console by doing the following:

  • Go to the EC2 Service
  • Click the Autoscaling Groups menu item
  • Select the autoscaling group.
  • Click the Delete button at the top of the console.

Below is where you would find the option in the menu (it's the last item), you can see the item at the bottom.

自动缩放组

When you delete the autoscaling group, any instances attached to the autoscaling group will be terminated.

In case you're interested here is the documentation for autoscaling groups, to help you understand more about them.

By the way if you contact AWS support and explain, they may be able to refund assuming you never used the resource.

It seems that your instance is in AutoScaling Group .

When instances are in ASG, once terminated, ASG launches replacements.

To rectify this, you have to delete the AutoScaling group as explained in the docs:

You can use AWS CLI to delete your ASG or Concole.

For CLI:

aws autoscaling delete-auto-scaling-group --auto-scaling-group-name <my-asg>

For console

在此处输入图像描述

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM