Interruption behavior - Amazon Elastic Compute Cloud
Services or capabilities described in Amazon Web Services documentation might vary by Region. To see the differences applicable to the China Regions, see Getting Started with Amazon Web Services in China (PDF).

Interruption behavior

You can specify that Amazon EC2 must do one of the following when it interrupts a Spot Instance:

Specify the interruption behavior

You can specify the interruption behavior when you create a Spot request. If you do not specify an interruption behavior, the default is that Amazon EC2 terminates Spot Instances when they are interrupted.

The way in which you specify the interruption behavior is different depending on how you request Spot Instances.

  • If you request Spot Instances using the launch instance wizard, you can specify the interruption behavior as follows: From Request type, choose Persistent (new console) or select the Persistent request check box (old console) and then, from Interruption behavior, choose an interruption behavior.

  • If you request Spot Instances using the Spot console, you can specify the interruption behavior as follows: Select the Maintain target capacity check box and then, from Interruption behavior, choose an interruption behavior.

  • If you configure Spot Instances in a launch template, you can specify the interruption behavior as follows: In the launch template, expand Advanced details and select the Request Spot Instances check box. Choose Customize and then, from Interruption behavior, choose an interruption behavior.

  • If you configure Spot Instances in the request configuration when using the create-fleet CLI, you can specify the interruption behavior as follows: For InstanceInterruptionBehavior, specify an interruption behavior.

  • If you configure Spot Instances in the request configuration when using the request-spot-fleet CLI, you can specify the interruption behavior as follows: For InstanceInterruptionBehavior, specify an interruption behavior.

  • If you configure Spot Instances using the request-spot-instances CLI, you can specify the interruption behavior as follows: For --instance-interruption-behavior, specify an interruption behavior.