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 - To view current Spot prices, visit the Spot Price History in the AWS Management Console for up to date pricing information for each Availability Zone. Legend: Frequency of interruption represents the rate at which Spot has reclaimed capacity during the trailing month.
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')
🌐
Amazon Web Services
docs.aws.amazon.com › amazon ec2 › user guide › amazon ec2 instances › amazon ec2 billing and purchasing options › spot instances › view spot instance pricing history
View Spot Instance pricing history - Amazon Elastic Compute Cloud
For the current Spot Instance prices, see Amazon EC2 Spot Instances Pricing ... In the navigation pane, choose Spot Requests. Choose Pricing history. For Graph, choose to compare the price history by Availability Zones or by Instance Types.
🌐
Microsoft Learn
learn.microsoft.com › en-us › answers › questions › 5521108 › availability-of-spot-instances
Availability of Spot-Instances - Microsoft Q&A
Get pricing history in the last 90 days and eviction rates for the last 28 trailing days to identify SKUs that better meet your specific needs. Spot pricing history and eviction rates data are available in the SpotResources table.
🌐
Amazon Web Services
amazonaws.cn › products › amazon ec2 › amazon ec2 spot
Amazon EC2 Spot Instances FAQs
1 week ago - Visit the Monitoring Your Spot Fleet section of the Amazon EC2 User Guide to learn how to describe your Spot fleet request's history. No. Spot fleet requests allow you to place multiple Spot instance requests simultaneously, and are subject to the same availability and prices as a single Spot instance request.
🌐
GitHub
github.com › awsdocs › amazon-ec2-user-guide › blob › master › doc_source › using-spot-instances-history.md
amazon-ec2-user-guide/doc_source/using-spot-instances-history.md at master · awsdocs/amazon-ec2-user-guide
When your Spot request is fulfilled, ... exceeding the On-Demand price. You can view the Spot price history for the last 90 days, filtering by instance type, operating system, and Availability Zone....
Author   awsdocs
Find elsewhere
🌐
Spot.io
spot.io › home › aws ec2 pricing › what are aws spot instances?
What are AWS spot instances?
December 13, 2022 - How can you check spot Instance price history? To view spot price history: Open the Amazon EC2 console and click Spot Requests. Select Pricing history. Choose a product (operating system).
🌐
Amazon Web Services
docs.aws.amazon.com › amazon ec2 › user guide › amazon ec2 instances › amazon ec2 billing and purchasing options › spot instances › get the status of a spot instance request
Get the status of a Spot Instance request - Amazon Elastic Compute Cloud
Spot request status information is composed of a status code, the update time, and a status message. Together, these help you determine the disposition of your Spot request. ... Amazon EC2 cannot launch all the instances you requested in the same Availability Zone.
🌐
ScienceDirect
sciencedirect.com › science › article › abs › pii › S0166361522001154
Methods for improving the availability of spot instances: A survey - ScienceDirect
May 28, 2022 - Describe the development history of spot instances and analyze what benefits the spot instance provides to cloud providers and users, respectively. ... A general taxonomy and detailed survey on the state-of-art work that improves the availability of using spot instances.
🌐
CloudBolt Software
cloudbolt.io › home › eguides › the guide to aws cost optimization › the ultimate guide to ec2 spot instances
The Ultimate Guide to EC2 Spot Instances | CloudBolt Software
June 30, 2025 - If you want to specify a maximum price, review the Spot Instance Pricing History first. You can view the Spot instance pricing history for the last 90 days and filter by instance type, operating system, and availability.
🌐
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.
🌐
AWSstatic
d1.awsstatic.com › whitepapers › cost-optimization-leveraging-ec2-spot-instances.pdf pdf
Archived Leveraging Amazon EC2 Spot Instances at Scale March 2018
The AWS Management Console makes a detailed billing report available, which · shows Spot Instance start and termination times for all instances. You can check · the billing report against historical Spot prices via the API to verify that the Spot
🌐
nOps
nops.io › blog › aws-spot-instance-pricing
AWS EC2 Spot Instance Pricing Guide | nOps
September 11, 2025 - In the navigation pane, select Spot Requests. Click on Pricing history in the upper menu. Filter by instance type, operating system, and Availability Zone to see a graph of Spot price trends for the last 90 days.
🌐
arXiv
arxiv.org › pdf › 2202.02973 pdf
SpotLake: Diverse Spot Instance Dataset Archive Service
Help | Advanced Search · arXiv is a free distribution service and an open-access archive for nearly 2.4 million scholarly articles in the fields of physics, mathematics, computer science, quantitative biology, quantitative finance, statistics, electrical engineering and systems science, and ...
🌐
Amazon Web Services
docs.aws.amazon.com › amazon ec2 › user guide › amazon ec2 instances › amazon ec2 billing and purchasing options › spot instances › how spot instances work
How Spot Instances work - Amazon Elastic Compute Cloud
A persistent Spot Instance request remains active until it expires or you cancel it, even if the request is fulfilled. If capacity is not available, your Spot Instance is interrupted. After your instance is interrupted, when capacity becomes available again, the Spot Instance is started if stopped or resumed if hibernated.