ec2-describe-spot-price-history

Description

Describes Spot Price history. Spot Instances are instances that Amazon EC2 starts on your behalf when the maximum price that you specify exceeds the current Spot Price. Amazon EC2 periodically sets the Spot Price based on available Spot Instance capacity and current spot instance requests. For conceptual information about Spot Instances, refer to the Amazon Elastic Compute Cloud Developer Guide or Amazon Elastic Compute Cloud User Guide.

Syntax

ec2-describe-spot-price-history [--start-time timestamp] [--end-time timestamp] [--instance-type type] [--product-description description]

Options

NameDescriptionRequired

--start-time date

Start date and time of the Spot Instance price history data.

Type: DateTime

Default: None

Example: --start-time 2009-12-01T11:51:50.000Z

No

--end-time date

End date and time of the Spot Instance price history data.

Type: DateTime

Default: None

Example: --end-time 2009-12-31T11:51:50.000Z

No

-instance-type type

Specifies the instance type to return.

Type: String

Valid Values: m1.small | m1.large | m1.xlarge | c1.medium | c1.xlarge | m2.xlarge | m2.2xlarge | m2.4xlarge

Default: None

Example: --instance-type m1.large

No

-d, --product-description description

The description of the AMI.

Type: String

Default: None

Constraints: Up to 255 characters.

Example: Standard Web Server AMI

No

Output

The command returns a table that contains the following information:

  • Request ID

  • Pricing History

Amazon EC2 displays errors on stderr.

Examples

Example Request

This example returns Spot Price history for the month of December.

PROMPT> ec2-describe-spot-price-history --start-time 2009-12-08T11:51:50.000 --instance-type m1.small
SPOTINSTANCEPRICE 0.0042 2009-12-09T05:26:54+0200 m1.small
							Linux/UNIX
SPOTINSTANCEPRICE 0.03 2009-12-09T10:42:08+0200 m1.small
							Linux/UNIX
SPOTINSTANCEPRICE 0.1 2009-12-09T12:20:10+0200 m1.small
							Linux/UNIX
SPOTINSTANCEPRICE 0.055 2009-12-10T00:08:27+0200 m1.small
							Linux/UNIX