AJ222
AJ222

Reputation: 1134

Aws spot instances using run-instances. How to prevent automatic restart after termination?

I am creating ec2 Spot instances using the command aws ec2 run-instances. I can see that the instances are terminated and restarted by aws. How can i make sure that if the instance is terminated by aws it does not get restarted by aws (i wish them to stay terminated).

Upvotes: 1

Views: 111

Answers (1)

John Rotenstein
John Rotenstein

Reputation: 269151

There are two options for SpotInstanceType: one-time and persistent.

You should use one-time, which means that the Spot Instance will not be restarted.

See: run-instances — AWS CLI Command Reference

Upvotes: 2

Related Questions