Result of run-instance request if no spot instance capacity

0

We use java sdk run-instance request to launch spot instances: https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/run-instance.html

What will happen when no capacity situation take place during request? Will we have error or Spot Instance Request will be created and it will be in status pending-fulfillment/capacity-not-available?

Is there way how we could produce "Spot capacity not available", "price too low" cases to test application behavior?

Alex
asked a month ago194 views
1 Answer
1

Simulating "Spot Capacity Not Available" and "Price Too Low" Scenarios Simulating these conditions for testing purposes can be challenging because they depend on real-time conditions in the AWS Spot Market, which are not directly controllable. However, you can use the following approaches to mimic these scenarios:

  1. Choose a Less Available Instance Type or Availability Zone: Some instance types or Availability Zones may have less available capacity due to high demand. By targeting these in your request, you might increase the chances of encountering a "no capacity" situation.

  2. Set a Very Low Bid Price: Setting a bid price significantly below the current spot price can help simulate the "price too low" condition. You can check the current spot price trends in the AWS Management Console or use the describe-spot-price-history CLI command to find a suitable low bid price.

profile picture
EXPERT
answered a month ago
profile picture
EXPERT
Artem
reviewed 23 days ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions