2

Is there is any way with the aws cli to check instance type availability within a given availability zone before actually launching one?

I'm building a cluster inside a VPC, which requires you to launch a subnet in a zone (either specified or assigned by aws) before you launch the instances, but there is no guarantee that the instance types you want are available in this zone at this point.

Yesterday I hit the dreaded InsufficientInstanceCapacity error and this needs to not happen. What is the correct way to deal this this? I cannot see any obvious ec2 commands for this.

I can loop through each zone creating and destroying subnets until I find one that sticks but there has to be a better way?

Cheers, nick

2

AWS finally responded directly to me and the answer is no, there is no way to check capacity. Their suggested solution is to fall back to more smaller instance types until you find one that works.

1

Yesterday I hit the dreaded InsufficientInstanceCapacity error and this needs to not happen. What is the correct way to deal this this?

Use reserved instances. This is precisely the use case for Reserved Instances. You'll also save a bunch of money over on-demand instances.

  • 1
    Also, don't use old generation hardware like the m1 stuff. – ceejayoz Oct 7 '15 at 16:25
  • 1
    Unless I'm missing something you need to pay 24/7 for reserved instances. I only require a few hours a day, so reserved instances would end up a lot more expensive despite the headline discount. – Nick Oct 7 '15 at 19:55
  • 1
    @Nick Well, now you get to decide which of "this needs to not happen" or "it'll cost a bit more" wins out. – ceejayoz Oct 7 '15 at 20:03
  • Nearly $40k a year for the reserved instances I would need means I will either be looping in bash or reverting to the rack of considerably cheaper real servers it's running on at the moment. – Nick Oct 7 '15 at 20:16
  • There are three tiers of reserved instances, depending on how much you intend to use them. – EEAA Oct 7 '15 at 21:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.