AWS services or capabilities described in AWS Documentation may vary by region/location. Click Getting Started with Amazon AWS to see specific differences applicable to the China (Beijing) Region.

IAmazonEC2.RequestSpotInstances (RequestSpotInstancesRequest)

Method

Search:

Creates a Spot Instance request. Spot Instances are instances that Amazon EC2 launches
when the maximum price that you specify exceeds the current Spot price. For more information,
see Spot
Instance Requests in the Amazon Elastic Compute Cloud User Guide.

Note:

For .NET Core and PCL this operation is only available in asynchronous form. Please refer to RequestSpotInstancesAsync.

The response from the RequestSpotInstances service method, as returned by EC2.

Examples

This example creates a one-time Spot Instance request for five instances in the specified Availability Zone. If your account supports EC2-VPC only, Amazon EC2 launches the instances in the default subnet of the specified Availability Zone. If your account supports EC2-Classic, Amazon EC2 launches the instances in EC2-Classic in the specified Availability Zone.

This example command creates a one-time Spot Instance request for five instances in the specified subnet. Amazon EC2 launches the instances in the specified subnet. If the VPC is a nondefault VPC, the instances do not receive a public IP address by default.