AWS CloudFormation
User Guide (Version )

AWS::EC2::LaunchTemplate SpotOptions

Specifies options for Spot instances.

SpotOptions is a property of the Amazon EC2 LaunchTemplate InstanceMarketOptions property type.

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "BlockDurationMinutes" : Integer, "InstanceInterruptionBehavior" : String, "MaxPrice" : String, "SpotInstanceType" : String, "ValidUntil" : String }

Properties

BlockDurationMinutes

The required duration for the Spot Instances (also known as Spot blocks), in minutes. This value must be a multiple of 60 (60, 120, 180, 240, 300, or 360).

Required: No

Type: Integer

Update requires: No interruption

InstanceInterruptionBehavior

The behavior when a Spot Instance is interrupted. The default is terminate.

Required: No

Type: String

Allowed Values: hibernate | stop | terminate

Update requires: No interruption

MaxPrice

The maximum hourly price you're willing to pay for the Spot Instances.

Required: No

Type: String

Update requires: No interruption

SpotInstanceType

The Spot Instance request type.

If you are using Spot Instances with an Auto Scaling group, use one-time requests, as the Amazon EC2 Auto Scaling service handles requesting new Spot Instances whenever the group is below its desired capacity.

Required: No

Type: String

Allowed Values: one-time | persistent

Update requires: No interruption

ValidUntil

The end date of the request. For a one-time request, the request remains active until all instances launch, the request is canceled, or this date is reached. If the request is persistent, it remains active until it is canceled or this date and time is reached. The default end date is 7 days from the current date.

Required: No

Type: String

Update requires: No interruption

See Also

On this page: