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
preguntada hace 2 meses167 visualizaciones
2 Respuestas
2
Respuesta aceptada

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
EXPERTO
respondido hace 2 meses
profile picture
EXPERTO
revisado hace 2 meses
profile picture
EXPERTO
revisado hace 2 meses
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
respondido hace 2 meses

No has iniciado sesión. Iniciar sesión para publicar una respuesta.

Una buena respuesta responde claramente a la pregunta, proporciona comentarios constructivos y fomenta el crecimiento profesional en la persona que hace la pregunta.

Pautas para responder preguntas