With Spot instances, you can bid on spare Amazon EC2 instances to reduce compute costs and improve application throughput. Like On-Demand instances, you can select a pre-configured or custom Amazon Machine Image (AMI), configure security and network access to your Spot instance, choose from multiple instance types and locations, use static IP endpoints, and attach persistent block storage to your Spot instances. Similarly, you pay for each instance by the hour with no up-front commitments.

With Spot instances, you choose the price you are willing to pay per instance hour, by specifying a bid price in your Spot instance request. When your bid meets or 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 bid price (whichever is sooner). The Spot price is set by Amazon EC2 and fluctuates periodically depending on the supply of and demand Spot instance capacity.

Amazon EC2 offers features and tools to help you optimize cost savings and application performance with Spot instances.

Launch an Amazon EC2 Instance for Free

Try Amazon EC2 for Free

AWS Free Tier includes 750 hours of Linux and Windows t2.micro instances each month for one year. To stay within the Free Tier, use only EC2 Micro instances.

View AWS Free Tier Details »

With Spot, you specify the price you are willing to pay per instance-hour. While the Spot price is below or equal to your bid price, you pay the Spot price. If your instance is interrupted due to an increase in the Spot price, you will not be charged for the partial hour that your instance has run. Learn more about how Spot works.

Spot fleets allow you to automatically bid on Spot instances with the lowest price per unit of capacity. Simply submit a Spot fleet request that includes the instance types that your application can use, and define a target capacity based on your application needs (in any unit including instances, vCPUs, memory, storage, or network throughput). Learn more about Spot fleets.

Spot fleets detect disrupted or manually terminated instances, and automatically replace them, to ensure that your application gets your desired amount of compute capacity. Spot fleets also enable you to provision Spot capacity across multiple instance pools, which helps improve your application's availability and reduce operating costs of the fleet over time.

With Spot instances, you never pay more than the price you specified. If the Spot price exceeds your bid price for a given instance, it will be terminated automatically (or stopped, if you opt for this behavior on persistent request). Spot offers three features to help you better track and control when Spot instances run and terminate (or stop).

Termination Notices

If you need to save state, upload final log files, or remove Spot instances from an Elastic Load Balancer before interruption, you can use termination notices, which are issued two minutes prior to interruption. Learn more about managing interruptions.

Persistent Requests

You can optionally set your request to remain open so that a new instance will be launched in its place when the Spot price falls back below your bid price. You can also have your Amazon EBS-backed instance stopped upon interruption and restarted when Spot has capacity at your preferred price. Learn more about persistent and one-time requests.

Block Durations

If you need to execute workloads continuously for 1 to 6 hours, you can also specify a duration requirement when requesting Spot instances. Learn more about block durations for Spot instances.

Amazon Web Services customers have the ability to run Amazon Elastic MapReduce (EMR) clusters on Spot instances and significantly reduce the cost of processing vast amounts of data on managed Hadoop clusters. Customers can run their EMR clusters by easily mixing Spot instances with On-Demand and/or Reserved instances using the multiple Instance Groups feature. To learn more about setting up an EMR cluster with Spot, visit the Amazon EC2 User Guide.

AWS CloudFormation makes it easy to organize and deploy a collection of AWS resources, including EC2 Spot, and lets you describe any dependencies or special parameters to pass in at runtime. For a sample High Performance Computing framework using CloudFormation that can use Spot instances, see the cfncluster demo. To learn more about setting up CloudFormation with Spot, visit the Amazon EC2 User Guide.

You can use Auto Scaling groups to launch and manage Spot instances, maintain application availability, and scale your Amazon EC2 Spot capacity up or down automatically according to conditions and bid prices you define. To learn more about using Auto Scaling with Spot instances, visit the Auto Scaling Developer Guide.

You can run Spot instances in a single-tenant manner on physically isolated hardware within a VPC, enabling you to satisfy security, privacy, or other compliance requirements for high scale workloads. Supported instance types include c3.8xlarge, c4.8xlarge, m4.10xlarge, m4.16xlarge, r3.8xlarge, r4.16xlarge, i2.8xlarge, d2.8xlarge, and g2.8xlarge.  To learn more about using dedicated tenancy visit the Spot instances section of the EC2 User Guide.

Spot instances are well suited to a variety of workloads. The more distributed, scalable, and fault tolerant your application, the easier it is to save money and increase throughput.

Complex analytics such as log scanning or simulations, typically performed as batch jobs, can be completed cost-effectively with Spot instances. Learn more about batch processing.

Financial Modeling and Analysis
Financial Services firms use Spot instances to reduce the time and cost to perform complex analysis ranging from wealth management simulations to Counterparty Value Analytics.

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. To learn more and see reference architectures, visit our blog.

Load, integration, canary, and security testing all benefit from the elasticity and price savings associated with Spot instances. Learn More.

Big Data
Spot instances can be used with tools like Amazon Elastic MapReduce to process massive amounts of data, from human genomes to the Twitter fire hose. Learn more.

Geospatial Analysis
Geographic information system (GIS) providers use Spot to speed up and reduce the cost of batch processing jobs such rendering and satellite image processing. Learn more about batch processing.

Scientific Computing
Scientific researchers and high performance computing customers use Spot to cost-effectively perform simulations ranging from drug discovery to genomics research. Learn More.

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.