Preventing an auto-terminated spot instances from restarting

193 Views Asked by At

Imagine I have a persistent spot request of size 1. If I manually stop this instance, it will not restart until I start it again.

However, if the instance is interrupted by AWS because of a lack of spot capacity, it will restart automatically when capacity is available (as I understand it).

How can I put an instance in the stopped-because-interrupted state into a state where it will not restart automatically if capacity becomes available.

1

There are 1 best solutions below

0
On

According to AWS documentation only EC2 can start interrupted spot instances so I think that the only option would be monitoring events/alerts which notify when instances restart and then stop them again with automation. Never tried this si this is only an educated guess/opinion.