Creates a Spot fleet request.
You can submit a single request that includes multiple launch specifications that vary by instance type, AMI, Availability Zone, or subnet.
By default, the Spot fleet requests Spot instances in the Spot pool where the price per unit is the lowest. Each launch specification can include its own instance weighting that reflects the value of the instance type to your application workload.
Alternatively, you can specify that the Spot fleet distribute the target capacity across the Spot pools included in its launch specifications. By ensuring that the Spot instances in your Spot fleet are in different Spot pools, you can improve the availability of your fleet.
For more information, see Spot Fleet Requests in the Amazon Elastic Compute Cloud User Guide.
The following parameters are for this specific action. For more information about required and optional parameters that are common to all actions, see Common Query Parameters.
Checks whether you have the required permissions for the action, without actually making the request, and provides an error response. If you have the required permissions, the error response is
DryRunOperation. Otherwise, it is
The configuration for the Spot fleet request.
Type: SpotFleetRequestConfigData object
The following elements are returned by the service.
The ID of the request.
The ID of the Spot fleet request.
For information about the errors that are common to all actions, see Common Errors.
This example creates a Spot fleet request with 2 launch specifications.
https://ec2.amazonaws.com/?Action=RequestSpotFleet &SpotFleetRequestConfig.IamFleetRole=arn:aws:iam::123456789011:role/spot-fleet-role &SpotFleetRequestConfig.SpotPrice=0.0153 &SpotFleetRequestConfig.TargetCapacity=5 &SpotFleetRequestConfig.LaunchSpecifications.1.ImageId=ami-1ecae776 &SpotFleetRequestConfig.LaunchSpecifications.1.InstanceType=m4.large &SpotFleetRequestConfig.LaunchSpecifications.1.SubnetId=subnet-1a2b3c4d &SpotFleetRequestConfig.LaunchSpecifications.2.ImageId=ami-1ecae776 &SpotFleetRequestConfig.LaunchSpecifications.2.InstanceType=m3.medium &SpotFleetRequestConfig.LaunchSpecifications.2.SubnetId=subnet-1a2b3c4d &AUTHPARAMS
<RequestSpotFleetResponse xmlns="http://ec2.amazonaws.com/doc/2016-11-15/"> <requestId>60262cc5-2bd4-4c8d-98ed-example</requestId> <spotFleetRequestId>sfr-123f8fc2-cb31-425e-abcd-example2710</spotFleetRequestId> </RequestSpotFleetResponse>
For more information about using this API in one of the language-specific AWS SDKs, see the following: