0

I'm trying to

  1. create an EBS volume
  2. create an EC2 instance, and then
  3. attach the volume to the instance.

But when I try this, I keep hitting InsufficientInstanceCapacity. Apparently, there's still lots of room for EBS volumes in certain zones, but no more EC2 instances can be created.

Is there an easy way to test for this condition, so that I can hide zones with no capacity from the user? Or is there some other trick, such as creating an EBS volume without specifying an availability zone, that will allow me to pick a zone with leftover capacity without guessing randomly?

  • By default, there is a limit of 20 instances per account, unless you have had them bump it up. It is also possible that your Availability Zone was at capacity, perhaps try another time. – Flashman Apr 13 '11 at 16:40
1

Try first launching the ec2 image, then create the EBS volume. When you attempt to launch the ami, you'll get the capacity error, add the exception handling and try starting it in a different az.

1) create EC2 instance 2) create EBS Volume 3) attach volume

  • Further research reveals that you're correct: There's no documented way to query for instance capacity before launching an instance. – emk Apr 25 '11 at 19:23

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.