SlideShare a Scribd company logo
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Chakra Nagarajan
Specialist Solutions Architect – EC2 Spot
Nov 2018
Amazon EC2 Spot Instances
Overview and best practices
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Agenda
• EC2 Spot Instances overview
• New pricing model – eliminate the bid
• New features and functionality
• Where to use Spot
• Interruption details
• Spot orchestration options (Fleet, ASG)
• Monitoring price and usage
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
We help
save koalas!
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
On-Demand
Pay for compute capacity by
the second or hour with no
long-term commitments
For spiky workloads or to
define needs initially
AWS EC2 Consumption Models
Reserved
Significant discount compared to
On-Demand instance pricing
Steady state applications or
predictable usage, databases
Spot
Spare EC2 capacity for up to 90%
off the On-Demand price.
For fault tolerant, instance flexible
or time-insensitive workloads
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon EC2 Spot Instances
Spare EC2 Capacity that AWS can reclaim with a 2 minute notice
Low Cost Easy access Usage flexibility
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Spare capacity at scale
Clemson university – 1.1 Million cores
https://tinyurl.com/clemson-spot
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
The Very Simple Rules of Spot Instances
The price changes infrequently
based on supply and demand of
spare capacity
Just request capacity and pay the
current rate. When we need the
capacity back you’ll get a 2 minute
warning
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Time flexibility
examples
• Model training
• Genomics
• Development
• Testing
• One-time queries
Time sensitive workloadsTime insensitive workloads
examples
• Web services
• APIs
• Analytics
• Grid computing
• Containers
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
How customers are using Spot instances
Big Data Containers & CI/CD HPC & Batch
Stateless Web
Services
• Benefits: Provides
acceleration, scale, and
deep cost savings to hyper-
scale workloads
• Features: Scale to large
numbers of parallel nodes
via Spot Fleet
• Integrations: EMR, Hadoop
or Spark; Specify 5 instance
types with weighted
capacities via EMR Instance
Fleets
• Benefits: Deploy stateless
containerized workloads and
manage clusters at any
scale at a fraction of the cost
• Features: Create EC2 Spot
Fleet directly from the ECS
console; Hibernate CI/CD
instances
• Integrations: ECS, EKS,
K8, KOPS, Kube-AWS,
Jenkins, Bamboo
• Benefits: Run multiple
projects simultaneously;
launch & de-commission
1000s of nodes
• Features: Spot Auto Scaling
groups; F1(FPGA), eg1
(Elastic GPUs), Cluster GPU
instances to accelerate
processing
• Integrations AWS Batch,
CloudFormation, Spot Fleet,
ECS
• Benefits: Scale, throughput
and deep cost savings for
large-scale web operations
• Features: launch and
manage a collection of
diversified Spot Instances
across pools Spot Fleet
• Integrations: Spot Fleet,
CloudFormation, EC2 Auto
Scaling
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
AWS
CloudFormation
AWS
OpsWorks
Amazon
EMR
Amazon
ECS
AWS Data
Pipeline
AWS BatchAuto Scaling
Amazon EC2 Spot works with…
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
$0.27 $0.29$0.50
1b 1c1a
8XL
$0.30 $0.16$0.214XL
$0.07 $0.08$0.082XL
$0.05 $0.04$0.04XL
$0.01 $0.04$0.01L
C4
$1.76
On
Demand
$0.88
$0.44
$0.22
$0.11
EC2 Spot pools
Each instance family
Each instance size
Each Availability Zone (55)
In every region (18)
Is a separate Spot pool
R5
M4
C5
I3 M5d
R4 D2
C4
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Low, Predictable Prices Eliminate the bid!
New Pricing Model
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
New Pricing Model - summary
• Reliable Spot costs – prices change less frequently
• No “bidding” required – if you choose to bid you’re setting a “Maximum price”
• Price no longer changes to reclaim instances
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Handling interruptions
Spot is optimized for stateless,
fault-tolerant, or flexible workloads.
Any application that can can have part
or all of the work, paused and resumed
or restarted, can use Spot.
Minimal interruptions
Over 95% of the instances were not
interrupted in the last 3 months
Check for 2-minute instance termination notice via instance
metadata or CloudWatch metrics and automate by:
☑ Checkpointing
☑ Draining from ELB
☑ Using stop-start and hibernate to restart faster
The work you are doing to make
your applications fault-tolerant
also benefits Spot
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Spot Instance Advisor - Example
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Interruption notices via CloudWatch Events
https://tinyurl.com/spot-cwe
Or poll the instance metadata internally
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Spot on RunInstances
$ aws ec2 run-instances --image-id ami-15e9c770 
--count 1 --instance-type c4.large --instance-market-options MarketType=spot
no bid/max price
No need to use a different API
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Spot fleet
• One-time request, or Maintains a collection of EC2 Instances
• Allocation strategy: Lowest Price or Diversified (across N number of pools)
• Integrated with ELB
• Auto scaling with target tracking or scheduled scaling
• On-demand capacity
• Multiple instance specifications
• Instance weights – scale according to your application needs (# of vCPU)
• Fleet Cloudwatch metrics (target capacity, fulfilled capacity)
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Amazon EC2 Fleet
Benefits
Reduce costs
Combine Spot, On-Demand and RIs to
run workloads at the lowest possible cost
Increase operational efficiency
Provision compute capacity across purchase
options, instance types, and AZs with a single API
Key features
Flexible capacity
allocation
Select an instance allocation
strategy that works for your
app and scale in App-aware
units (vCPU, GB RAM, etc.)
Massive
scale
Launch 1000’s of instances
with a single API call and
scale to 1000’s of cores,
TB’s of memory, etc.
Simplified
provisioning
Select instances, assign
weights, specify target
capacity for On-Demand
and Spot Instances, and
build a fleet within seconds
Spot
Instances
On-Demand
Instances
On-Demand
Instances
Spot
Instances
Reserved
Instances
Reserved
Instances
AZ1 AZ2
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Spot Blocks
• Defined duration workload without interruptions
• 1-6 hours
• Lower discounts compared to Spot
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Interruption behaviors
Terminat
e
HibernateStop
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Is my workload Spot Ready?
Stateless Fault-Tolerant Flexible: Multi-
AZ and Instance
Flexibility
Loosely Coupled
Looks familiar?
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
EC2 Spot price history
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Monitoring Spot usage – Cost Explorer
Y e a r b y m o n t h – l o n g t e r m t r e n d s
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Monitoring Spot usage – Cost Explorer
M o n t h b y d a y – s h o r t t e r m c h a n g e s a n d a n o m a l y d e t e c t i o n
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Customers across different
industries and vertical use Spot..
© 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Thank you

More Related Content

PDF
Computing Performance: On the Horizon (2021)
PPTX
Centralized Logging System Using ELK Stack
PDF
PowerDNS-Admin vs DNS-UI
PPTX
How and Why GraalVM is quickly becoming relevant for developers (ACEs@home - ...
PDF
Understanding and Improving Code Generation
PPTX
Windows 7 AppLocker: Understanding its Capabilities and Limitations
PDF
Analisis de viabilidad y costos de hardware
PDF
Getting Started with Apache Spark on Kubernetes
Computing Performance: On the Horizon (2021)
Centralized Logging System Using ELK Stack
PowerDNS-Admin vs DNS-UI
How and Why GraalVM is quickly becoming relevant for developers (ACEs@home - ...
Understanding and Improving Code Generation
Windows 7 AppLocker: Understanding its Capabilities and Limitations
Analisis de viabilidad y costos de hardware
Getting Started with Apache Spark on Kubernetes

What's hot (13)

PPT
Jenkins Overview
PPT
Ganglia Monitoring Tool
PDF
Juraci Paixão Kröhling - All you need to know about OpenTelemetry
PPTX
Applications of java
PDF
VMware ESXi - Intel and Qlogic NIC throughput difference v0.6
PPTX
Kafka Tutorial - basics of the Kafka streaming platform
PDF
Exactly-once Semantics in Apache Kafka
PPTX
PDF
How to reverse engineer Android applications
PDF
Linux Profiling at Netflix
PPTX
Why your Spark Job is Failing
PDF
Dominik Strube – Understanding UNECE WP.29 regulations on cybersecurity
PDF
How Uber scaled its Real Time Infrastructure to Trillion events per day
Jenkins Overview
Ganglia Monitoring Tool
Juraci Paixão Kröhling - All you need to know about OpenTelemetry
Applications of java
VMware ESXi - Intel and Qlogic NIC throughput difference v0.6
Kafka Tutorial - basics of the Kafka streaming platform
Exactly-once Semantics in Apache Kafka
How to reverse engineer Android applications
Linux Profiling at Netflix
Why your Spark Job is Failing
Dominik Strube – Understanding UNECE WP.29 regulations on cybersecurity
How Uber scaled its Real Time Infrastructure to Trillion events per day
Ad

More from AWS User Group Bengaluru (20)

PDF
Demystifying identity on AWS
PPTX
AWS Secrets for Best Practices
PPTX
Cloud Security
PDF
Lessons learnt building a Distributed Linked List on S3
PDF
Medlife journey with AWS
PPTX
Building Efficient, Scalable and Resilient Front-end logging service with AWS
PPTX
Exploring opportunities with communities for a successful career
PPTX
Slack's transition away from a single AWS account
PDF
Log analytics with ELK stack
PDF
Serverless Culture
PPTX
Refactoring to serverless
PDF
Amazon EC2 Spot Instances Workshop
PPTX
Building Efficient, Scalable and Resilient Front-end logging service with AWS
PDF
Medlife's journey with AWS from 0(zero) orders to 6 digit mark
PPTX
AWS Secrets for Best Practices
PPTX
Exploring opportunities with communities for a successful career
PDF
Lessons learnt building a Distributed Linked List on S3
PPTX
Cloud Security
PDF
Cost Optimization in AWS
PPTX
Keynote - Chaos Engineering: Why breaking things should be practiced
Demystifying identity on AWS
AWS Secrets for Best Practices
Cloud Security
Lessons learnt building a Distributed Linked List on S3
Medlife journey with AWS
Building Efficient, Scalable and Resilient Front-end logging service with AWS
Exploring opportunities with communities for a successful career
Slack's transition away from a single AWS account
Log analytics with ELK stack
Serverless Culture
Refactoring to serverless
Amazon EC2 Spot Instances Workshop
Building Efficient, Scalable and Resilient Front-end logging service with AWS
Medlife's journey with AWS from 0(zero) orders to 6 digit mark
AWS Secrets for Best Practices
Exploring opportunities with communities for a successful career
Lessons learnt building a Distributed Linked List on S3
Cloud Security
Cost Optimization in AWS
Keynote - Chaos Engineering: Why breaking things should be practiced
Ad

Recently uploaded (20)

PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PDF
Understanding Forklifts - TECH EHS Solution
PDF
2025 Textile ERP Trends: SAP, Odoo & Oracle
PPTX
Operating system designcfffgfgggggggvggggggggg
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
PPTX
Online Work Permit System for Fast Permit Processing
PDF
System and Network Administraation Chapter 3
PDF
AI in Product Development-omnex systems
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Upgrade and Innovation Strategies for SAP ERP Customers
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PPTX
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
PPTX
L1 - Introduction to python Backend.pptx
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
Design an Analysis of Algorithms II-SECS-1021-03
Understanding Forklifts - TECH EHS Solution
2025 Textile ERP Trends: SAP, Odoo & Oracle
Operating system designcfffgfgggggggvggggggggg
ManageIQ - Sprint 268 Review - Slide Deck
VVF-Customer-Presentation2025-Ver1.9.pptx
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Audit Checklist Design Aligning with ISO, IATF, and Industry Standards — Omne...
Online Work Permit System for Fast Permit Processing
System and Network Administraation Chapter 3
AI in Product Development-omnex systems
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Upgrade and Innovation Strategies for SAP ERP Customers
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
Agentic AI : A Practical Guide. Undersating, Implementing and Scaling Autono...
L1 - Introduction to python Backend.pptx

Amazon EC2 Spot Instances

  • 1. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Chakra Nagarajan Specialist Solutions Architect – EC2 Spot Nov 2018 Amazon EC2 Spot Instances Overview and best practices
  • 2. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Agenda • EC2 Spot Instances overview • New pricing model – eliminate the bid • New features and functionality • Where to use Spot • Interruption details • Spot orchestration options (Fleet, ASG) • Monitoring price and usage
  • 3. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. We help save koalas!
  • 4. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. On-Demand Pay for compute capacity by the second or hour with no long-term commitments For spiky workloads or to define needs initially AWS EC2 Consumption Models Reserved Significant discount compared to On-Demand instance pricing Steady state applications or predictable usage, databases Spot Spare EC2 capacity for up to 90% off the On-Demand price. For fault tolerant, instance flexible or time-insensitive workloads
  • 5. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon EC2 Spot Instances Spare EC2 Capacity that AWS can reclaim with a 2 minute notice Low Cost Easy access Usage flexibility
  • 6. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Spare capacity at scale Clemson university – 1.1 Million cores https://tinyurl.com/clemson-spot
  • 7. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. The Very Simple Rules of Spot Instances The price changes infrequently based on supply and demand of spare capacity Just request capacity and pay the current rate. When we need the capacity back you’ll get a 2 minute warning
  • 8. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Time flexibility examples • Model training • Genomics • Development • Testing • One-time queries Time sensitive workloadsTime insensitive workloads examples • Web services • APIs • Analytics • Grid computing • Containers
  • 9. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. How customers are using Spot instances Big Data Containers & CI/CD HPC & Batch Stateless Web Services • Benefits: Provides acceleration, scale, and deep cost savings to hyper- scale workloads • Features: Scale to large numbers of parallel nodes via Spot Fleet • Integrations: EMR, Hadoop or Spark; Specify 5 instance types with weighted capacities via EMR Instance Fleets • Benefits: Deploy stateless containerized workloads and manage clusters at any scale at a fraction of the cost • Features: Create EC2 Spot Fleet directly from the ECS console; Hibernate CI/CD instances • Integrations: ECS, EKS, K8, KOPS, Kube-AWS, Jenkins, Bamboo • Benefits: Run multiple projects simultaneously; launch & de-commission 1000s of nodes • Features: Spot Auto Scaling groups; F1(FPGA), eg1 (Elastic GPUs), Cluster GPU instances to accelerate processing • Integrations AWS Batch, CloudFormation, Spot Fleet, ECS • Benefits: Scale, throughput and deep cost savings for large-scale web operations • Features: launch and manage a collection of diversified Spot Instances across pools Spot Fleet • Integrations: Spot Fleet, CloudFormation, EC2 Auto Scaling
  • 10. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. AWS CloudFormation AWS OpsWorks Amazon EMR Amazon ECS AWS Data Pipeline AWS BatchAuto Scaling Amazon EC2 Spot works with…
  • 11. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. $0.27 $0.29$0.50 1b 1c1a 8XL $0.30 $0.16$0.214XL $0.07 $0.08$0.082XL $0.05 $0.04$0.04XL $0.01 $0.04$0.01L C4 $1.76 On Demand $0.88 $0.44 $0.22 $0.11 EC2 Spot pools Each instance family Each instance size Each Availability Zone (55) In every region (18) Is a separate Spot pool R5 M4 C5 I3 M5d R4 D2 C4
  • 12. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Low, Predictable Prices Eliminate the bid! New Pricing Model
  • 13. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. New Pricing Model - summary • Reliable Spot costs – prices change less frequently • No “bidding” required – if you choose to bid you’re setting a “Maximum price” • Price no longer changes to reclaim instances
  • 14. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Handling interruptions Spot is optimized for stateless, fault-tolerant, or flexible workloads. Any application that can can have part or all of the work, paused and resumed or restarted, can use Spot. Minimal interruptions Over 95% of the instances were not interrupted in the last 3 months Check for 2-minute instance termination notice via instance metadata or CloudWatch metrics and automate by: ☑ Checkpointing ☑ Draining from ELB ☑ Using stop-start and hibernate to restart faster The work you are doing to make your applications fault-tolerant also benefits Spot
  • 15. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Spot Instance Advisor - Example
  • 16. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Interruption notices via CloudWatch Events https://tinyurl.com/spot-cwe Or poll the instance metadata internally
  • 17. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Spot on RunInstances $ aws ec2 run-instances --image-id ami-15e9c770 --count 1 --instance-type c4.large --instance-market-options MarketType=spot no bid/max price No need to use a different API
  • 18. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Spot fleet • One-time request, or Maintains a collection of EC2 Instances • Allocation strategy: Lowest Price or Diversified (across N number of pools) • Integrated with ELB • Auto scaling with target tracking or scheduled scaling • On-demand capacity • Multiple instance specifications • Instance weights – scale according to your application needs (# of vCPU) • Fleet Cloudwatch metrics (target capacity, fulfilled capacity)
  • 19. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Amazon EC2 Fleet Benefits Reduce costs Combine Spot, On-Demand and RIs to run workloads at the lowest possible cost Increase operational efficiency Provision compute capacity across purchase options, instance types, and AZs with a single API Key features Flexible capacity allocation Select an instance allocation strategy that works for your app and scale in App-aware units (vCPU, GB RAM, etc.) Massive scale Launch 1000’s of instances with a single API call and scale to 1000’s of cores, TB’s of memory, etc. Simplified provisioning Select instances, assign weights, specify target capacity for On-Demand and Spot Instances, and build a fleet within seconds Spot Instances On-Demand Instances On-Demand Instances Spot Instances Reserved Instances Reserved Instances AZ1 AZ2
  • 20. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Spot Blocks • Defined duration workload without interruptions • 1-6 hours • Lower discounts compared to Spot
  • 21. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Interruption behaviors Terminat e HibernateStop
  • 22. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Is my workload Spot Ready? Stateless Fault-Tolerant Flexible: Multi- AZ and Instance Flexibility Loosely Coupled Looks familiar?
  • 23. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. EC2 Spot price history
  • 24. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Monitoring Spot usage – Cost Explorer Y e a r b y m o n t h – l o n g t e r m t r e n d s
  • 25. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Monitoring Spot usage – Cost Explorer M o n t h b y d a y – s h o r t t e r m c h a n g e s a n d a n o m a l y d e t e c t i o n
  • 26. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Customers across different industries and vertical use Spot..
  • 27. © 2018, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Thank you