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 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南