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
gefragt vor 2 Monaten167 Aufrufe
2 Antworten
2
Akzeptierte Antwort

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
EXPERTE
beantwortet vor 2 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten
profile picture
EXPERTE
überprüft vor 2 Monaten
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
beantwortet vor 2 Monaten

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen