liveBook · Manning

Spot instance

As explained in Amazon Web Services in Action, Third Edition: An in-depth guide to AWS

A Spot Instance is an EC2 instance purchased at a discount using AWS spare capacity that may be reclaimed when AWS needs the resources.

A Spot Instance is an EC2 instance that uses spare AWS capacity at a substantial discount, but AWS can delay its launch or terminate it on short notice when capacity is needed. section 3.8 section 3.8.2

Use Spot Instances when workloads can tolerate interruption and restart:

  • Process queued S3 object-scanning jobs for virus or malware detection. section 3.8.2
  • Convert media files when an orchestrator can automatically restart failed jobs. section 3.8.2
  • Handle portions of a fault-tolerant web application or run test systems where brief outages are acceptable. section 3.8.2

Spot capacity costs less than on-demand capacity but provides lower reliability. Unlike Savings Plans, it requires launching new instances and planning for interruption; it fits batch workloads better than critical, stateful services. section 3.8 section 3.8.2

Launching a Spot Instance

Open EC2 in the AWS Management Console, select Spot Requests, choose Request Spot Instances, select Manual Configure Launch Parameters, and choose an Amazon Linux 2 AMI. Plan for interruptions before launching. section 3.8.2

Table 3.2 Differences between on-demand instances, Savings Plans, and Spot Instances (view table figure)

 

On-demand instances

Savings Plans

Spot Instances

Price

High

Medium

Low

Flexibility

High

Low

Medium

Reliability

High

High

Low

Scenarios

Dynamic workloads (e.g., for a news site) or proof of concept

Predictable and static workloads (e.g., for a business application)

Batch workloads (e.g., for data analytics, media encoding, etc.)

Compare on-demand instances, Savings Plans, and Spot Instances by price, flexibility, reliability, and workload scenario. section 3.8

How Amazon Web Services in Action, Third Edition: An in-depth guide to AWS covers it

How deep it goes
Defines pricing and interruption behavior, gives workload examples, and outlines console launch steps without detailing full fleet configuration.
Examples
Uses S3 scanning, queued media conversion, fault-tolerant web requests, test systems, and a console launch procedure.
What it assumes
Assumes basic EC2 familiarity while introducing Spot pricing, spare capacity, interruption risk, and suitable workload patterns.
What you can do after
Operate/configure Spot Instances through the EC2 console and design workloads to tolerate interrupted virtual machines.
How it connects
Connects Spot Instances with EC2, on-demand instances, Savings Plans, S3, queues, batch processing, and fault tolerance.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Amazon Web Services in Action, Third Edition: An in-depth guide to AWS. The section links point to the parts of the book it draws on.