AWS::EC2::LaunchTemplate SpotOptions
Specifies options for Spot Instances.
SpotOptions
is a property of AWS::EC2::LaunchTemplate InstanceMarketOptions.
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
}
YAML
BlockDurationMinutes:
Integer
InstanceInterruptionBehavior:String
MaxPrice:String
SpotInstanceType:String
ValidUntil:String
Properties
BlockDurationMinutes
-
Deprecated.
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. We do not recommend using this parameter because it can lead to increased interruptions. If you do not specify this parameter, you will pay the current Spot price.
Important
If you specify a maximum price, your Spot Instances will be interrupted more frequently than if you do not specify this parameter.
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, in UTC format (YYYY-MM-DDTHH:MM:SSZ). Supported only for persistent requests.
-
For a persistent request, the request remains active until the
ValidUntil
date and time is reached. Otherwise, the request remains active until you cancel it. -
For a one-time request,
ValidUntil
is not supported. The request remains active until all instances launch or you cancel the request.
Default: 7 days from the current date
Required: No
Type: String
Update requires: No interruption
-
See also
-
LaunchTemplateSpotMarketOptionsRequest in the Amazon EC2 API Reference