AWS::EC2::EC2Fleet SpotOptionsRequest
Specifies the configuration of Spot Instances for an EC2 Fleet.
SpotOptionsRequest
is a property of the
AWS::EC2::EC2Fleet resource.
Syntax
To declare this entity in your AWS CloudFormation template, use the following syntax:
JSON
{ "AllocationStrategy" :
String
, "InstanceInterruptionBehavior" :String
, "InstancePoolsToUseCount" :Integer
, "MaxTotalPrice" :String
, "MinTargetCapacity" :Integer
, "SingleAvailabilityZone" :Boolean
, "SingleInstanceType" :Boolean
}
YAML
AllocationStrategy:
String
InstanceInterruptionBehavior:String
InstancePoolsToUseCount:Integer
MaxTotalPrice:String
MinTargetCapacity:Integer
SingleAvailabilityZone:Boolean
SingleInstanceType:Boolean
Properties
AllocationStrategy
-
Indicates how to allocate the target Spot Instance capacity across the Spot Instance pools specified by the EC2 Fleet.
If the allocation strategy is
lowestPrice
, EC2 Fleet launches instances from the Spot Instance pools with the lowest price. This is the default allocation strategy.If the allocation strategy is
diversified
, EC2 Fleet launches instances from all the Spot Instance pools that you specify.If the allocation strategy is
capacityOptimized
, EC2 Fleet launches instances from Spot Instance pools that are optimally chosen based on the available Spot Instance capacity.Allowed Values:
lowestPrice
|diversified
|capacityOptimized
Required: No
Type: String
Update requires: Replacement
InstanceInterruptionBehavior
-
The behavior when a Spot Instance is interrupted. The default is
terminate
.Required: No
Type: String
Allowed values:
hibernate | stop | terminate
Update requires: Replacement
InstancePoolsToUseCount
-
The number of Spot pools across which to allocate your target Spot capacity. Valid only when Spot AllocationStrategy is set to
lowest-price
. EC2 Fleet selects the cheapest Spot pools and evenly allocates your target Spot capacity across the number of Spot pools that you specify.Required: No
Type: Integer
Update requires: Replacement
MaxTotalPrice
-
The maximum amount per hour for Spot Instances that you're willing to pay.
Required: No
Type: String
Update requires: Replacement
MinTargetCapacity
-
The minimum target capacity for Spot Instances in the fleet. If the minimum target capacity is not reached, the fleet launches no instances.
Required: No
Type: Integer
Update requires: Replacement
SingleAvailabilityZone
-
Indicates that the fleet launches all Spot Instances into a single Availability Zone. Supported only for fleets of type
instant
.Required: No
Type: Boolean
Update requires: Replacement
SingleInstanceType
-
Indicates that the fleet uses a single instance type to launch all Spot Instances in the fleet. Supported only for fleets of type
instant
.Required: No
Type: Boolean
Update requires: Replacement
See also
-
SpotOptionsRequest in the Amazon EC2 API Reference