EC2 Spot instance continually restarting after termination.

0

I am running a spot instance of an ec2 as I only want to use it occasionally. However every time I log in it is running even though I make sure to terminate it when I have finished using it. I have an image that I use to spin up the instance and since I (incorrectly) assume that now instance will be running when I log in I spin it up from the image and get a quota limit reached error as I can only have one instance running so I don't know if it is creating a back log of spinning up instance requests which seems silly but it's the only reason I can think of. If I stop the instance it doesn't create anymore but I want to be able to terminate it and leave it terminated until I decide to use it again. I don't know why this is happening all of a sudden. I have just done a check now and 4 times I terminated the running instance and all 4 times it started up again. I tried stopping it first then terminating and the same thing happened. For now I have stopped the instance but I would like to terminate it if possible. Any help would be greatly appreciated as my bill is running up.

ts
已提问 2 个月前167 查看次数
2 回答
2
已接受的回答

Hello.

Please check "Delete the EC2 Fleet" described in the following document.
If there is a fleet left, I think it may continue to start to fill capacity.
https://repost.aws/knowledge-center/ec2-instance-relaunched-after-termination

Make sure to cancel your Spot Instance request.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html#using-spot-instances-cancel

I think if you delete the spot instance after canceling the request, it will no longer continue to start.
https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/spot-requests.html#terminating-a-spot-instance

profile picture
专家
已回答 2 个月前
profile picture
专家
已审核 2 个月前
profile picture
专家
已审核 2 个月前
0

Hi Riku,

Thanks very much for your response. I removed the Spot Instance request and that appears to have solved it. I don't have the cli installed and didn't want to mess around with ec2 fleet so I didn't try that.

Thanks again you're a legend!

Regards

ts
已回答 2 个月前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则