|« PreviousNext »|
|Did this page help you? Yes | No | Tell us about it...|
In this section, we will step you through how to get started using Spot Instances. First, we'll take you through what you need to know before you begin and the prerequisites you need to get started.
We will walk you through the following activities:
If you are new to Spot Instances, take a look at Prerequisites for Using Spot Instances to make sure you can take full advantage of the benefits of this Amazon EC2 product. If you have been using Amazon EC2 and you're ready to proceed, click one of the steps in the preceding list to get going.
Before requesting a Spot Instance, consider configuring your Amazon Machine Image (AMI) so that your application does the following:
Automatically performs the tasks you want at start-up because the instance will start asynchronously without notification. For example, if you're using batch processes, you could set up your AMI to pull jobs from an Amazon Simple Queue Service (Amazon SQS) queue.
Stores important data regularly in a place that won’t be affected by instance termination. For example, you could store your data using Amazon Simple Storage Service (Amazon S3), Amazon SimpleDB, or Amazon Elastic Block Store (Amazon EBS).
Although Spot Instances can use Amazon EBS-backed AMIs, be aware that Spot Instances do not support the Stop/Start feature. In other words, you can't stop and start Spot Instances launched from an AMI that has an Amazon EBS root device. For information about Amazon EBS, see Amazon Elastic Block Store (Amazon EBS).
Handles termination gracefully.
For information about creating AMIs, see Creating Your Own AMIs.
To work with Amazon EC2 Spot Instances, we assume you have read and completed the instructions described in Getting Started with EC2, which provides information on creating your Amazon EC2 account and credentials.
In addition, whichever you choose to use—the AWS Management Console, the Amazon EC2 command line interface (CLI), or the Amazon EC2 application programming interface (API)—Amazon EC2 provides tools for Spot Instances that you can use to assess Spot price history, submit Spot Instance requests (also called bids), and manage your Spot requests and instances. You can also use, develop, and manage your applications using the AWS SDKs. For more information, see Tools for Amazon Web Services.
In the AWS Management Console, the EC2 console has tools specifically designed for Spot Instance request tasks. The EC2 console also has general tools that you can use to manage the instances launched when your requests are fulfilled. The following list identifies the tools you can use in the EC2 console:
The Spot Requests page is the main way you interact with your Spot Instance requests.
Spot Instance Pricing History gives you an insight in the pricing patterns for specific Spot Instance types in Availability Zones over a defined period.
Use the Request Spot Instances page to submit a Spot Instance request and specify the details of the instance to be launched when your request succeeds.
Use the Instances page to manage the instances launched when your Spot request succeeds.
You can use Amazon EC2 command line tools specifically designed for managing Spot requests. To manage the instances launched when your Spot request is fulfilled, use the same commands that you use for On-Demand EC2 instances.
If you use the Amazon EC2 command line interface (CLI) tools, we assume that you have read and completed the instructions described in the Getting Started with the Command Line Tools section of the Amazon EC2 User Guide. It walks you through setting up your environment for use with the CLI tools.
The following table lists the commands you use for Spot request tasks.
For information about CLI commands, go to the Amazon Elastic Compute Cloud Command Line Reference.
You can use Amazon EC2 API tools specifically designed to manage your Spot requests. To manage the instances launched when your Spot request is fulfilled, use the same API actions that you use for On-Demand EC2 instances.
The following table lists the API actions you use for Spot request tasks.
For information about API actions, go to the Amazon Elastic Compute Cloud API Reference.
Java developers can go to the AWS SDK for Java to consult the Java tutorials on Spot Instances: