0
votes

I have suddenly started getting no capacity available error while trying to create defined duration based spot instance in us-west-2. Other region works fine for me. I do not see any option to specify a price while trying to create this type of spot instance.

I do not have any other spot instance or any other ec2 instance running for me in this AZ as well.

My hypothesis is that there is no ec2 capacity available in whole us-west-2 region right now to create a spot instance. But I am finding that hard to believe. Is that correct?

Also I went through doc but it doesn't point out that by capacity it means for the whole of the aws us-west-2 region or just for my account

1
What Instance Type and AZs did you specify?John Rotenstein
@JohnRotenstein t2.micro and us-west-2a ... note that there was no option to specify any price with duration based spot instance..nitinsh99
You might want to try T3 -- it's better and lower cost.John Rotenstein

1 Answers

1
votes

The no Spot capacity available error occurs when there isn't enough spare capacity to fulfill your Spot Instance or Spot Fleet request.

As capacity becomes available, Amazon EC2 fulfills requests in the following order:

Reserved Instances -> On-Demand Instances -> Spot Instances

The Spot request continues to automatically make the launch request until capacity becomes available. When capacity becomes available, Amazon EC2 fulfills the Spot request.

Its important to take a note about Lifecyle of spot request ->

Also according to lifecycle of spot request

If one or more request constraints are valid but can't be met yet, or if there is not enough capacity, the request goes into a holding state waiting for the constraints to be met. The request options affect the likelihood of the request being fulfilled. For example, if you specify a maximum price below the current Spot price, your request stays in a holding state until the Spot price goes below your maximum price. If you specify an Availability Zone group, the request stays in a holding state until the Availability Zone constraint is met. In the event of an outage of one of the Availability Zones, there is a chance that the spare EC2 capacity available for Spot Instance requests in other Availability Zones can be affected