Spot Instances allow you to name your own price for Amazon EC2 computing capacity. You simply bid on spare Amazon EC2 instances and run them whenever your bid exceeds the current Spot Price, which varies in real-time based on supply and demand. The Spot Instance pricing model complements the On-Demand and Reserved Instance pricing models, providing potentially the most cost-effective option for obtaining compute capacity, depending on your application.

Spot Instances can significantly lower your computing costs for time-flexible, interruption-tolerant tasks. Spot prices are often significantly less than On-Demand prices for the same EC2 instance types (see current Spot prices below). Additionally, for some distributed, fault-tolerant tasks (like web-crawling or Monte Carlo applications), you may be able to simultaneously accelerate your computational task and reduce its overall cost by opportunistically incorporating Spot Instances.

spot_instances

Using Spot Instances can generate savings that you can keep, invest elswhere, or pass on to your customers. Because Spot prices are typically far below (recently 86% lower, on average) On Demand prices, you can lower the cost of your interruption-tolerant tasks and, potentially, accelerate those applications when there are many Spot Instances available.

There are four general categories of time-flexible and interruption-tolerant tasks that work well with Spot Instances:

  1. Optional tasks that are nice-to-have but not strictly required. When Spot prices are low, you can run your optional tasks; when they are high you can choose not to run them. (E.g., Leveraging cheap compute cycles to get extra confidence in your computer simulations.)
  2. Delayable tasks whose deadlines allow you to be flexible about when you run your computations. (E.g., Weekly batch jobs, background transcoding or compression, etc.)
  3. Tasks that can be sped up by adding additional computing power. You can add Spot Instances to a core of On Demand or Reserved Instances to opportunistically "boost" your application's performance when the Spot price is low but maintain a minimum guaranteed level of performance. (E.g., Adding Spot instances to a Hadoop job in Elastic MapReduce.)
  4. Tasks that require a large number of compute instances that you can't access any other way. With Spot, you can conduct runs with thousands or more instances for time-critical workloads. (E.g., Massively parallel Monte Carlo runs for particle physics research.)

Learn more: See how Spot Instances can help you by looking at Example Use Cases and Featured Case Studies below.


Spot Instances are spare Amazon EC2 instances for which you can name your own price. The Spot Price is set by Amazon EC2, which fluctuates in real-time according to Spot Instances supply and demand. When your bid exceed the Spot Price, your Spot instance is launched and your instance will run until the Spot Price exceed your bid (a Spot interruption) or you choose to terminate them. (See Understanding Spot Requests below for more details about how Spot bids are fulfilled.)

To use Spot Instances, you place a Spot Instance request that specifies the instance type, the Availability Zone desired, the number of Spot Instances desired, and the maximum price you are willing to pay per instance hour (your bid).

To determine how that maximum price compares to past Spot Prices, the Spot Price history for the past 90 days is available via the Amazon EC2 API and the AWS Management Console. See the video to the right for more information.

video-thumb-spot-bidding-strategy
4:34
Deciding on Your Spot Bidding Strategy

Please note the following important points:

  • Spot Instances perform exactly like other Amazon EC2 instances while running. They only differ in their pricing model and the possibility of being interrupted when the Spot price exceeds your max bid.
  • You will never pay more than your maximum bid price per hour. By placing your max bid at the maximum you're willing to pay per Spot instance-hour, you set the upper bound on your Spot computational costs.
  • If your Spot instance is interrupted by Amazon EC2, you will not be charged for any partial hour of usage. For example, if your Spot instance is interrupted 59 minutes after it starts, we will not charge you for that 59 minutes. However, if you terminate your instance, you will pay for any partial hour of usage as you would for On-Demand Instances.
  • You should always be prepared for the possibility that your Spot Instance may be interrupted. A high max bid price may reduce the probability that your Spot Instance will be interrupted, but cannot prevent interruption. If the Spot price exceeds your max bid or there is no longer spare EC2 capacity in a given Spot pool, your instances will be terminated. See Architecting Applications to Use Spot Instances for guidance around managing interruptions.

Get Started: See Using Spot Instances to immediately start using Spot Instances.

Learn More: See Spot Features to learn more about features that help you manage your Spot applications, including Auto Scaling, Elastic MapReduce, and CloudFormation integration.


There are a large number of use cases that work well for Spot Instances. The characteristic that unites all of these applications is that they have fault tolerance, so that an application can handle the potential for interruption if their Spot request is outbid. Common techniques customers use to manage interruption are covered in a video tutorial (click here to view the tutorials section). Example applications well-suited to take advantage of Spot Instance's low price and elasticity include:

video-thumb-when-to-use-spot-instances
6:02
When to Use Amazon Spot Instances
spot_analytics

Analytics
Complex analytics such as log scanning or simulations that are typically performed as batch jobs now can be completed more cost-effectively on Spot instances.
>> View Customer Case Studies

spot_big_data

Big Data
Processing massive amounts of data such as genomes, Twitter feeds, or trends on the web is cost-effective and easy by leveraging Spot instances with other tools like Elastic MapReduce.
>> View Customer Case Studies

spot_financial

Financial Modeling and Analysis
Financial Services firms leverage Spot Instances to reduce the time and cost when performing complex analysis ranging from wealth management simulations to Counterparty Value Analytics.

spot_gis

Geospatial Analysis
Geospatial tools providers leverage Spot to speed up and reduce the cost of batch processing jobs such rendering and complex analytics problems.
>> View Customer Case Studies

spot_media

Image and Media Encoding
Media and Entertainment companies can cost-effectively render and encode media assets using Spot Instances, scaling their infrastructures based on demand.
>> View Customer Case Studies

spot_scientific

Scientific Computing
Scientific researchers and high performance computing customers leverage Spot to cost-effectively perform simulations ranging from drug discovery to genomics research.
>> Learn more!

spot_test

Testing
Load, integration, canary, and security testing all benefit from the elasticity and price savings associated with Spot Instances.
>> View Customer Case Studies

spot_web_crawling

Web Crawling
Web crawling processes can easily and cost-effectively scale-out on Spot Instances by leveraging Amazon Elastic MapReduce or other tools to get work done faster and typically cheaper.
>> View Customer Case Studies


A number of features make it easier to take advantage of Spot Instances in your EC2 applications.

Auto Scaling Integration: Spot Instances with Auto Scaling enables you to automatically scale the number of Spot Instances you run based on your demand or according to a schedule you define. For more information on Spot Instance integration with Auto Scaling, see the Auto Scaling with Spot Instances Quick Start Tutorial in the Amazon EC2 Developers Guide.

AWS CloudFormation Integration: Using AWS CloudFormation, you can create and manage a collection of related AWS resources including Spot Instances. For more information on using Spot Instance integration with CloudFormation, see the Using CloudFormation with Spot Instances Quick Start Tutorial in the Amazon EC2 User's Guide.

Amazon Elastic MapReduce Integration: Amazon Web Services customers have the ability to run their Amazon Elastic MapReduce applications on Spot Instances, significantly reducing the cost of processing vast amounts of data on managed Apache Hadoop clusters. Customers can run their Elastic MapReduce applications entirely on Spot Instances to enjoy the largest potential cost savings or they can easily mix Spot Instances with On-Demand and/or Reserved Instances to protect against cluster failure due to Spot Instances being outbid. For additional information on using the feature, including how to use it with the Java SDK and Ruby CLI, please visit the Spot Instances section of the Amazon Elastic MapReduce Developer Guide.

video-thumb-spot-emr
3:27
Using Spot Instances with EMR

Bid Statuses: Spot Bid Statuses provide detailed information about the current state of your Spot Bid in the bid request provisioning lifecycle (pending evaluation, pending fullfillment, fulfilled, etc.). These statuses help answer key questions, like: Why has my Spot Bid not been fulfilled yet? Why was my Spot Instance terminated or interrupted? Can I change anything in my Spot Bid to get it fulfilled faster?

Persistent Spot Requests: When you specify a Spot bid request as "persistent", you ensure that it is automatically resubmitted after its instance is terminated—by you or by Amazon EC2—until you cancel the bid request. This enables you to automate launching Spot instances any time the Spot price is below your maximum price.

Launch Groups: If you want to run a cluster of instances that always launch and terminate simultaneously, you can specify a Launch Group in your request, which requires Amazon EC2 to launch that group of Spot Instances all at once or not at all. (Note: Assigning Spot requests to a Launch Group may reduce the chance that they can be fulfilled.)

Availability Zones Groups: You may specify an Availability Zone (AZ) Group to ensure your Spot instances will be launched together in the same Availability Zone. ((Note: As with Launch Groups, assigning Spot requests to an AZ Group may reduce the chance that they can be fulfilled.)

Price History: You can access the Spot price history for each instance type in each Availability Zone via the AWS Management Console and the Amazon EC2 APIs. A Spot price history can help you determine how high to set your max bid price to achieve your desired uptime for your instance. (Note that, being based on real-time customer demand, past pricing patterns may not repeat in the future.)

Custom Notifications: You can use Amazon SNS to notify your application about changes in the state of your Amazon EC2 Instances, current Spot Instance Requests, and Spot Prices within a particular region. To view a sample application, please click here.

Amazon Elastic MapReduce Integration: Amazon Web Services customers have the ability to run their Amazon Elastic MapReduce applications on Spot Instances, significantly reducing the cost of processing vast amounts of data on managed Apache Hadoop clusters. Customers can run their Elastic MapReduce applications entirely on Spot Instances to enjoy the largest potential cost savings or they can easily mix Spot Instances with On-Demand and/or Reserved Instances to protect against cluster failure due to Spot Instances being outbid. For additional information on using the feature, including how to use it with the Java SDK and Ruby CLI, please visit the Spot Instances section of the Amazon Elastic MapReduce Developer Guide.

video-thumb-launching-spot
7:40
Launching Spot Instances in Amazon VPC


Spot Instances can be requested using the AWS Management Console or Amazon EC2 APIs. To start with the AWS Management Console:

  1. Log in to the AWS Management Console, then click the “Amazon EC2” tab.
  2. Click on “Spot Requests” in the navigation pane on the left.
  3. Click on “Pricing History” to open a view of historical pricing selectable by instance type. This will help you choose a maximum price for your request. Pricing shown is specific to the Availability Zone selected. If no Availability Zone is selected, you will see the prices for each Availability Zone in the Region.
  4. Click on “Request Spot Instances” and proceed through the Launch Instance Wizard process, choosing an AMI and instance type. Enter the number of Spot Instances you would like to request, your maximum price and whether the request is persistent or not. After choosing your key pair and security group(s), you are ready to submit your Spot Instance request.
video-thumb-spot-instances-getting-started
4:13
Getting Started with Spot Instances

You can also use the following AWS CloudFormation templates to quickly get started launching and managing Spot Instances:

  • Asynchronous Queue-Based Processing: This template uses Spot Instances, along with AutoScaling, Amazon Simple Queue Service, and Amazon S3, to build an automatically scaling asynchronous message queue. Launch now!
  • Web Site Load Testing: This template uses Spot Instances, along with Auto Scaling and Bees with Machine Guns, to perform web site load. Launch now!
  • Grid Computing: This template uses Spot Instances as the worker nodes in an Oracle Grid Engine Environment with the master node as either On-Demand or Reserved Instances. Launch now!

To learn more about these templates, please visit the Amazon EC2 User's Guide. For detailed information on how to request Spot Instances through the Amazon EC2 API, see the Amazon EC2 API Reference in the latest EC2 Technical Documentation. For a walk through of using Spot Instances and more information on how to get the most out of Spot Instances, please read Introduction to Spot Instances. To learn more about the differences between On-Demand, Reserved and Spot Instances, go to Amazon EC2 Instance Purchasing Options.


There are a number of best practices to keep in mind when making use of Spot Instances:

Architect for the Potential of Interruption: Because Spot Instances can be terminated without warning, it is important to build your applications in a way that allows you to make progress even if your application is interrupted. There are many ways to accomplish this, two of which are splitting your work into small increments (via Grid, Hadoop-based, or queue-based architectures) or adding checkpoints to you application and saving your work frequently. Using Amazon EBS volumes to store your data is one easy way to protect your data. No matter the architecture you decide, if your application can handle interruption, then you have the opportunity to significantly reduce your instance costs.

video-thumb-manage-spot-interruption
3:59
How to Manage Spot Instance Interruption

Test Your Application: Make sure your application is fault-tolerant and can handle unexpected Spot interruptions. While we attempt to cleanly terminate your instances, your application should be prepared to deal with an immediate shutdown.For example, consider having a master node on On Demand that directs the actions of worker nodes on Spot (e.g., to work on an Amazon SQS queue).

Track when Spot Instances Start and Terminate: The simplest way to know the current status of your Spot Instances is to monitor your Spot requests and running instances via the AWS Management Console or Amazon EC2 API.

Choose a Reasonable Maximum Price for Your Request: Remember that the maximum bid price you submit is the maximum you are willing to pay to keep the Spot Instance running, but is not necessarily what you will pay per hour. Your maximum bid price should be high enough to provide the desired likelihood that your Spot instances will run, but not so high that you would not be willing to pay that amount if the the Spot price lingered there for an hour or more. Use the Spot Price history via the AWS Management Console or the Amazon EC2 API to help you set a maximum price.


The key differences between Spot Instances and On-Demand Instances are that Spot Instances may not start immediately, the hourly Spot price varies, and Amazon EC2 may terminate individual Spot Instances. This section describes how these work with a simple example.

Let’s assume you decide to place a Spot request for one Standard Small (m1.small) instance in the US East – Northern Virginia us-east-1a Availability Zone. You can see from the Spot Price history in the AWS Management Console or by using the Amazon EC2 API that the Spot Price in that Availability Zone has recently fluctuated about every 1-2 hours between $0.030/hr and $0.060/hour, and is currently $0.050/hr. You decide you want to bid a maximum price of $0.045/hr. You create your request by using the AWS Management Console or making a request through the Amazon EC2 API. Because your maximum price is less than the current Spot Price, no instance is launched and your request remains in a pending state.

Two hours later, the Spot Price drops to $0.045/hr. At this point, your request may or may not start running. This is because your maximum price exactly equals the current Spot price and there may be more requests at this price than can be fulfilled. Let’s assume your instance does not start. Thirty minutes later, the Spot price drops to $0.039/hr. Because this is below your maximum price, a Spot Instance will soon be launched and you will expect to pay $0.039/hr for the instance’s first complete hour.

Continuing our example, three hours later the Spot price increases to $0.043/hr. You will now pay $0.043/hr if you continue to run the instance. You would not expect your instance to be shut down by Amazon EC2 because the Spot Price is still lower than your maximum price.

One hour later, the Spot price increases to $0.045/hr. At this point, your instance may or may not get terminated (based on available supply), and in this case it continues to run. You will be charged $0.045/hr for continuing to run this instance.

Finally, four hours later, the Spot price increases to $0.055/hr. Because this is greater than your maximum price, your Spot Instance is terminated by Amazon EC2. You will not be charged for any partial hour that your instance consumed since it was terminated by Amazon EC2.

Spot Bid Statuses help you monitor the status of your Spot requests and figure out where they are in the Spot provisioning lifecycle. For example, if your bid status says "price-too-low", you know that we haven't fulfilled your request yet because your bid price isn't high enough relative to current Spot prices. If your bid status says "pending-fulfillment", you know that we found capacity for your Spot request and are about to launch your Spot Instance. And if your bid status says "marked-for-termination", you know that your Spot Instance is about to be interrupted because either the Spot price has risen above your bid price or another constraint was encountered.

You can view Bid Statuses in the AWS Management Console and via the API or CLI. For more information, see our Spot Bid Status documentation.


Spot Instances enable you to bid for unused Amazon EC2 capacity. Instances are charged the Spot Price, which is set by Amazon EC2 and fluctuates periodically depending on the supply of and demand for Spot Instance capacity. To use Spot Instances, you place a Spot Instance request, specifying the instance type, the Region desired, the number of Spot Instances you want to run, and the maximum price you are willing to pay per instance hour. To determine how that maximum price compares to past Spot Prices, the Spot Price history is available via the Amazon EC2 API and the AWS Management Console. If your maximum price bid exceeds the current Spot Price, your request is fulfilled and your instances will run until either you choose to terminate them or the Spot Price increases above your maximum price (whichever is sooner).

Spot instance-hours are billed based on the Spot price at the start of each instance-hour. If your Spot Instance is interrupted in the middle of an instance-hour (because the Spot price exceeded your max bid price), you are not billed for that partial hour of Spot use. (However, if you terminate the Spot instance, you are charged for the partial hour of use.)

The following table displays the Spot Price per Region and instance type (updated every 5 minutes). In addition to Linux/Unix and Windows, we also offer Spot Instances for Amazon EC2 running SUSE Linux Enterprise Server. Spot Instances are not currently supported in the AWS GovCloud Region.


Except as otherwise noted, our prices are exclusive of applicable taxes and duties, including VAT and applicable sales tax. For customers with a Japanese billing address, use of the Asia Pacific (Tokyo) Region is subject to Japanese Consumption Tax. Learn more.

If you would like to go straight to a view of the latest Spot Instance pricing:

  1. Log in to the AWS Management Console, then click the “Amazon EC2” tab.
  2. Click on “Spot Requests” in the navigation pane on the left.
  3. Click on “Pricing History” to open a view of pricing selectable by instance type.

(Amazon EC2 is sold by Amazon Web Services, Inc.)


Scribd
Scribd allows users to turn PDF, Microsoft Office Word and Microsoft Office PowerPoint files into Web documents using a solution built on Amazon EC2 and Amazon S3. Scribd used Amazon EC2 spot instances for a recent batch conversion job, saving 63%, or $10,500, compared to what it would have spent on on-demand instances for the same job.

foursquare
foursquare® is a location-based social network in which its more than 10 million users check in via a smartphone app or SMS to exchange travel tips and to share their location with friends. To perform analytics across more than 3 million daily check-ins, Foursquare Labs, Inc. uses Amazon Elastic MapReduce with Amazon EC2 Spot Instances.

So-net
So-net Entertainment Corporation, one of Japan’s largest Internet Service Providers and Media and Entertainment companies, reduced their analytics costs by over 50% using Amazon Elastic MapReduce and Amazon EC2 Spot Instances.

Trendsmap.com
Trendsmap.com displays real-time mapping of word trends on Twitter. The Website is a product of Stateless Systems, a Melbourne, Australia-based Web workshop. When Stateless Systems needs access to short term processing of large volumes of data for Trendsmap.com, it calls up Amazon EC2 Spot Instances. Amazon EC2 Spot Instances allow Stateless Systems to save money by bidding on unused instances to temporarily augment the Website’s computing resources.

Ooyala
Ooyala is a leader in online video technology for publishing, analytics, and monetization across all connected devices. Its comprehensive video technology gives content owners deep insights that help drive increased viewer engagement and revenue from video. Its use of Amazon Elastic Compute Cloud (Amazon EC2), including Spot, Reserved, and On-Demand Instances and Amazon Simple Storage Service (Amazon S3) has enabled the company to decrease time to market and virtually eliminate wait time for users.

DNAnexus
DNAnexus provides a unified system of data management and sequence analysis for DNA sequencing centers and researchers. DNAnexus uses Amazon Elastic Compute Cloud (Amazon EC2) Spot Instances to conduct all of its DNA analysis, while Amazon EC2 On-Demand Instances handle the company’s interactive services, such as its client front end portal and visualization tools. DNAnexus also relies on Amazon Simple Storage Service (Amazon S3) to meet the company’s extensive storage demand, which will grow from terabytes into petabytes of data.

Numerate
Numerate is a Bay Area biotechnology platform company focused on making the drug design process more data-driven, efficient, and predictable. The company has incorporated Amazon EC2 as a production computational cluster and Amazon S3 for cache storage. Numerate enjoys around 50% cost savings by using Amazon EC2 Spot Instances after spending just 5 days of engineering effort.

Backtype
BackType develops products and services that help companies understand their social impact by measuring online conversations. To manage a complex system that processes data in both batch and real-time, the company uses Amazon EC2 Spot Instances to save up to 66% over On-Demand Instances and Amazon Simple Storage Service (Amazon S3) for storage.

Fliptop
Fliptop helps brands convert their e-mail lists into social profiles. The company uses numerous solutions from Amazon Web Services (AWS), including Amazon Elastic MapReduce with Spot Instances, enabling them to quickly scale their capacity for agency and corporate clients to millions of contact lookups per day and decrease their data processing costs by over 50%.

video-thumb-spot-instances-getting-started
4:13
Getting Started with Spot Instances

Video Tutorial: How to Launch a Spot Instance
Watch this video tutorial to learn how to launch your first Spot Instance. This tutorial covers placing a bid, determining when the instance is fulfilled, and canceling/terminating the instance.

Guide: Getting Started with Spot Instances
For a more detailed walk through of using Spot Instances and more information on how to get the most out of Spot Instances, please read this guide.

video-thumb-when-to-use-spot-instances
6:02
When to Use Amazon Spot Instances

Video Tutorial: Common Spot Use Cases
In this video, we will walk through example spot instance use cases. As a part of this video, we will cover several customer examples including Numerate, Clarity Solutions, Ooyala, and BrowserMob and how they leverage Spot Instances in their architectures.

video-thumb-manage-spot-interruption
3:59
How to Manage Spot Instance Interruption

Video Tutorial: How to Manage Interruption
Watch this video to learn how some customers manage the interruption of their Spot instances.

Guide: Getting Started Programming Guide for Spot Instances
This code tutorial provides a quick overview of how to bid, describe, and cancel Spot instances programmatically.

Guide: Advanced Programming Guide for Spot Instances
This quick code tutorial provides a quick overview of more advanced provisioning topics and interruption management techniques for Spot Instances.

Guide: How to Track Spot Instance Activity with the Spot Notifications Sample Application
This code tutorial and sample enables you to generate and manage Amazon SNS notifications for changes in the state of your Amazon EC2 Instances, current Spot Instance Requests, and Spot Prices within a particular region. By leveraging this code sample, you can now setup your applications running on Spot Instances to more easily manage the potential of interruption.

video-thumb-spot-bidding-strategy
4:34
Deciding on Your Spot Bidding Strategy

Video Tutorial: Deciding on Your Spot Bidding Strategy
Watch this video to learn the tips and tricks for bidding on your Spot Instances. We cover several different bidding strategies that we have seen customers leverage with success.

video-thumb-spot-emr
3:27
Using Spot Instances with EMR

Video Tutorial: Launching Amazon Elastic MapReduce Job Flows with Spot Instances
Watch this video to learn how to launch Amazon Elastic MapReduce job flows on your Spot Instances. We cover launching a Spot cluster and shutting one down in the AWS Management Console.

video-thumb-launching-cluster-spot
7:50
Launching a Cluster on Amazon Ec2 Spot Instances Using StarCluster

Video Tutorial: How to Launch a Cluster on Spot
Chris Dagdigian from BioTeam provides a quick overview of how to start a Cluster from scratch in around 10-15 minutes on Amazon EC2 Spot Instances using StarCluster. StarCluster is an opensource tool that was created by a lab at MIT that makes it easy to setup a new Oracle Grid Engine Cluster. During this presentation, Chris walks through the process of installing, setting up, and running simple jobs on a cluster. Additionally, Chris leverages Spot Instances, so that you can potentially get work done faster and potentially save up to 93% off of the On-Demand price. If you are interested in this tutorial, you may also want to see our StarCluster CloudFormation Template.

video-thumb-launching-spot
7:40
Launching Spot Instances in Amazon VPC

Video Tutorial: Launching Spot Instances in Amazon VPC
Watch this video to learn how to launch your Spot instances in Amazon VPC. This tutorial covers placing a bid, determining when the instance is fulfilled, and canceling/terminating the instance.