There is no public API to check Spot Instance availability. Having said that, you can still achieve what you want by following the below steps:

  1. Use request_spot_fleet instead, and configure it to launch a single instance.
  2. Be flexible with the instance types you use, pick as many as you can and include them in the request. To help you pick the instances, check Spot Instance advisor for instance interruption and saving rates.
  3. At the Spot Fleet request, configure AllocationStrategy to capacityOptimized this will allow the fleet to allocate capacity form the most available Spot instance from your instances list and reduce the likelihood of Spot interruptions.
  4. Don't set a max price SpotPrice, the default Spot instance price will be used. The pricing model for Spot has changed and it's no longer based on bidding, therefore Spot prices are more stable and don't fluctuate.
Answer from Ahmed Nada on Stack Overflow
🌐
AWS
aws.amazon.com › ec2 › ec2 spot › instance advisor
Amazon EC2 Spot Instances - AWS
1 week ago - Legend: Frequency of interruption represents the rate at which Spot has reclaimed capacity during the trailing month. They are in ranges of < 5%, 5-10%, 10-15%, 15-20% and >20%. For more examples on how to use Spot price history to build price aware applications please visit (aws-spot-labs). ...
🌐
CloudZero
cloudzero.com › home › blog › what is spot instance advisor? a beginner-friendly guide
What Is Spot Instance Advisor? A Beginner-Friendly Guide
December 5, 2023 - The Spot Instance Advisor lets you select the following details based on your Spot Instance EC2 compute needs. AWS region, specifying which AWS Availability Zone (AZ) you want. The Spot Instance Advisor currently offers 21 AWS regions.
Discussions

amazon web services - AWS EC2 spot instance availability - Stack Overflow
I am using the API call request_spot_instances to create spot instance without specifying any availability zone. Normally a random AZ is picked by the API. The spot request sometimes would return a... More on stackoverflow.com
🌐 stackoverflow.com
[aws][autoscaler] AWS: When using spot instances, always single availability zone is selected
With config region: us-east-1 - ... for AWS spot request. When I list all AZs manually (availability_zone: us-east-1d,us-east-1e,us-east-1f,us-east-1a,us-east-1b,us-east-1c) - always first is selected! Expected behavior should be to select ALL availability zones. Maybe it's less important for on demand instances, but often ... More on github.com
🌐 github.com
4
April 28, 2022
Play games using an EC2 spot instance?
I've done this before, and it wasn't too difficult to set up. My advice is to get some price monitoring set up, and price to be high enough where you won't get booted quickly. I was in a big section of batman and I lost my instance. So game away! More on reddit.com
🌐 r/aws
31
19
June 17, 2015
AWS Spot instance EKS with stateful pods
Use a stateful set backed by an EBS volume More on reddit.com
🌐 r/kubernetes
14
6
September 3, 2021
🌐
Amazon Web Services
amazonaws.cn › products › amazon ec2 › amazon ec2 spot
Amazon EC2 Spot Instances FAQs
1 week ago - Linux/UNIX and Windows Server are available. Windows Server with SQL Server is not currently available. Not at this time. Over the last 3 months, 92% of Spot instance interruptions were from a customer manually terminating the instance because the application had completed it's work.
Top answer
1 of 2
5

There is no public API to check Spot Instance availability. Having said that, you can still achieve what you want by following the below steps:

  1. Use request_spot_fleet instead, and configure it to launch a single instance.
  2. Be flexible with the instance types you use, pick as many as you can and include them in the request. To help you pick the instances, check Spot Instance advisor for instance interruption and saving rates.
  3. At the Spot Fleet request, configure AllocationStrategy to capacityOptimized this will allow the fleet to allocate capacity form the most available Spot instance from your instances list and reduce the likelihood of Spot interruptions.
  4. Don't set a max price SpotPrice, the default Spot instance price will be used. The pricing model for Spot has changed and it's no longer based on bidding, therefore Spot prices are more stable and don't fluctuate.
2 of 2
2

This may be a bit overkill for what you are looking for but with parts of the code you can find the spot price history for the last hour (this can be changed). It'll give you the instance type, AZ, and additional information. From there you can loop through the instance type to by AZ. If a spot instance doesn't come up in say 30 seconds try the next AZ.

And to Ahmed's point in his answer, this information can be used in the spot_fleet_request instead of looping through the AZs. If you pass the wrong AZ or subnet in the spot fleet request, it may pass the dryrun api call, but can still fail the real call. Just a heads up on that if you are using the dryrun parameter.

Here's the output of the code that follows:

In [740]: df_spot_instance_options
Out[740]:
    AvailabilityZone   InstanceType  SpotPrice  MemSize  vCPUs  CurrentGeneration Processor
0         us-east-1d        t3.nano      0.002      512      2               True  [x86_64]
1         us-east-1b        t3.nano      0.002      512      2               True  [x86_64]
2         us-east-1a        t3.nano      0.002      512      2               True  [x86_64]
3         us-east-1c        t3.nano      0.002      512      2               True  [x86_64]
4         us-east-1d       t3a.nano      0.002      512      2               True  [x86_64]
..               ...            ...        ...      ...    ...                ...       ...
995       us-east-1a    p2.16xlarge      4.320   749568     64               True  [x86_64]
996       us-east-1b    p2.16xlarge      4.320   749568     64               True  [x86_64]
997       us-east-1c    p2.16xlarge      4.320   749568     64               True  [x86_64]
998       us-east-1d    p2.16xlarge     14.400   749568     64               True  [x86_64]
999       us-east-1c  p3dn.24xlarge      9.540   786432     96               True  [x86_64]

[1000 rows x 7 columns]

And here's the code:

import boto3
import pandas as pd
from datetime import datetime, timedelta

ec2c = boto3.client('ec2')
ec2r = boto3.resource('ec2')

#### The rest of this code maps the instance details to spot price in case you are looking for certain memory or cpu
paginator = ec2c.get_paginator('describe_instance_types')
response_iterator = paginator.paginate( )

df_hold_list = []
for page in response_iterator:
    df_hold_list.append(pd.DataFrame(page['InstanceTypes']))

df_instance_specs = pd.concat(df_hold_list, axis=0).reset_index(drop=True)
df_instance_specs['Spot'] = df_instance_specs['SupportedUsageClasses'].apply(lambda x: 1 if 'spot' in x else 0)
df_instance_spot_specs = df_instance_specs.loc[df_instance_specs['Spot']==1].reset_index(drop=True)

#unapck memory and cpu dictionaries
df_instance_spot_specs['MemSize'] = df_instance_spot_specs['MemoryInfo'].apply(lambda x: x.get('SizeInMiB'))
df_instance_spot_specs['vCPUs'] = df_instance_spot_specs['VCpuInfo'].apply(lambda x: x.get('DefaultVCpus'))
df_instance_spot_specs['Processor'] = df_instance_spot_specs['ProcessorInfo'].apply(lambda x: x.get('SupportedArchitectures'))

#look at instances only between 30MB and 70MB
instance_list = df_instance_spot_specs['InstanceType'].unique().tolist()

#---------------------------------------------------------------------------------------------------------------------
# You can use this section by itself to get the instancce type and availability zone and loop through the instance you want
# just modify instance_list with one instance you want informatin for
#look only in us-east-1
client = boto3.client('ec2', region_name='us-east-1')
prices = client.describe_spot_price_history(
    InstanceTypes=instance_list,
    ProductDescriptions=['Linux/UNIX', 'Linux/UNIX (Amazon VPC)'],
    StartTime=(datetime.now() -
               timedelta(hours=1)).isoformat(),
               # AvailabilityZone='us-east-1a'
    MaxResults=1000)

df_spot_prices = pd.DataFrame(prices['SpotPriceHistory'])
df_spot_prices['SpotPrice'] = df_spot_prices['SpotPrice'].astype('float')
df_spot_prices.sort_values('SpotPrice', inplace=True)
#---------------------------------------------------------------------------------------------------------------------

# merge memory size and cpu information into this dataframe
df_spot_instance_options = df_spot_prices[['AvailabilityZone', 'InstanceType', 'SpotPrice']].merge(df_instance_spot_specs[['InstanceType', 'MemSize', 'vCPUs',
                                            'CurrentGeneration', 'Processor']], left_on='InstanceType', right_on='InstanceType')
🌐
GitHub
github.com › ray-project › ray › issues › 24310
[aws][autoscaler] AWS: When using spot instances, always single availability zone is selected · Issue #24310 · ray-project/ray
April 28, 2022 - With config region: us-east-1 - always the last AZ is selected (us-east-1f) for AWS spot request. When I list all AZs manually (availability_zone: us-east-1d,us-east-1e,us-east-1f,us-east-1a,us-east-1b,us-east-1c) - always first is selected! Expected behavior should be to select ALL availability zones. Maybe it's less important for on demand instances, but often spot instances aren't available in a zone, but are available in others (especially when it comes to GPUs).
Published   Apr 28, 2022
🌐
Cast AI
cast.ai › cast ai › spot instance availability map
Spot instance availability map - Cast AI
February 17, 2025 - Spot Instance Availability Map This map displays real-time Spot instance interruptions, insufficient capacity events, and pricing across AWS, Azure, and GCP.
Find elsewhere
🌐
The Cloudericks Blog
cloudericks.com › home › aws cloud › understanding ec2 spot instances, spot blocks, and spot fleets
Understanding EC2 Spot Instances, Spot Blocks, and Spot Fleets - The Cloudericks Blog
December 25, 2024 - Spot Instances are an AWS offering ... prices. However, these instances come with a catch: Availability: Your Spot Instance can be terminated at any moment if the market price exceeds your bid price....
🌐
Amazon Web Services
docs.aws.amazon.com › amazon ec2 › user guide › amazon ec2 instances › amazon ec2 billing and purchasing options › spot instances › spot instance interruptions
Spot Instance interruptions - Amazon Elastic Compute Cloud
Demand for Spot Instances can vary significantly from moment to moment, and the availability of Spot Instances can also vary significantly depending on how many unused EC2 instances are available. It is always possible that your Spot Instance might be interrupted.
🌐
Spot.io
spot.io › home › aws ec2 pricing › what are aws spot instances?
What are AWS spot instances?
December 13, 2022 - However, in reality, they can also be used for a much broader set of use cases, without any significant impact on availability or performance. Here are some examples: Stateful applications typically require data and IP persistence.
🌐
AWSstatic
d1.awsstatic.com › training-and-certification › docs-cloud-practitioner › AWS-Certified-Cloud-Practitioner_Exam-Guide.pdf pdf
AWS Certified Cloud Practitioner (CLF-C02) Exam Guide Introduction
• Amazon EC2 instance types (for example, Reserved, On-Demand, Spot) • AWS global infrastructure (for example, AWS Regions, Availability Zones) • Infrastructure as code (IaC) • AWS Knowledge Center · • Machine learning · • Management and governance ·
🌐
CloudZero
cloudzero.com › home › blog › on-demand vs. spot instances: what’s the difference?
On-Demand Vs. Spot Instances: What’s The Difference?
September 10, 2025 - Cloud providers do not fully commit compute capacity to you. The cloud provider can take back Spot Instances with just a 2-minute notice. Plus, Spot Instances aren’t covered by the 99.99% uptime/availability SLAs.
🌐
AWS
calculator.aws
AWS Pricing Calculator
AWS Pricing Calculator lets you explore AWS services, and create an estimate for the cost of your use cases on AWS.
🌐
CloudKeeper
cloudkeeper.com › home › glossary › spot instances (aws)
Spot Instances (AWS) | CloudKeeper
How Spot Instances WorkAWS continuously monitors available EC2 capacity. When there is unused capacity in a given availability zone, AWS offers it at reduced prices as Spot Instances. Users can request these instances through the AWS Management Console, EC2 Fleet, Auto Scaling Groups, or APIs.
🌐
Codementor
codementor.io › community › doing more with aws ec2 spot instances
Doing More with AWS EC2 Spot Instances | Codementor
June 4, 2019 - AWS provides an additional option to use Spot blocks for workloads that are less than 6 hours that are guaranteed not be interrupted and available up to 50 % off! It was found that nearly 50% of EMR jobs run for less than 6 hours.
🌐
Medium
medium.com › @chaisarfati › an-overview-of-ec2-spot-instances-c580e72510ce
An Overview of EC2 Spot Instances | by Chai Sarfati | Medium
February 11, 2024 - Spot offers no guarantee on the time your instance will be able to run for. You can be interrupted in the middle of a process with a two-minute grace period. Spot offers no guarantee on the availability of the instances you requested.
🌐
Microsoft Azure
azure.microsoft.com › en-us › updates
Azure updates | Microsoft Azure
1 week ago - Available to all Azure customers for non-production use and testing.
🌐
wikiHow
wikihow.tech › finance and business › shopping › shopping online › amazon › how to use amazon ec2 spot instances - wikihow tech
How to Use Amazon EC2 Spot Instances - wikiHow Tech
October 22, 2025 - In particular, the t2.micro instance, a small instance type that is ideal if you just want an instance for basic testing, is not available as a spot instance. However, this instance is available for free in the AWS Free Tier.
🌐
Amazon Web Services
docs.aws.amazon.com › amazon ec2 › user guide › amazon ec2 instances › amazon ec2 billing and purchasing options › spot instances › best practices for amazon ec2 spot
Best practices for Amazon EC2 Spot - Amazon Elastic Compute Cloud
It does not guarantee available capacity or predict the risk of interruption. You can use the Spot placement score feature in the Amazon EC2 console, AWS CLI, or an SDK. For more information, see Spot placement score. Spot enables you to think in terms of aggregate capacity—in units that include vCPUs, memory, storage, or network throughput—rather than thinking in terms of individual instances.
🌐
Intellipaat
intellipaat.com › home › blog › what are aws ec2 spot instances?
What are AWS EC2 Spot Instances?
December 29, 2024 - ... Bidding: You place a bid for ... others in the Spot Instance market. Availability: When your bid price is higher than the current market price, you get the Spot Instance....