Tuesday, November 11, 2014

AWS EC2 error code: 'insufficientInstanceCapacity'

I recently received the following error while trying to Start an instance in AWS:

AWS EC2 error code: 'insufficientInstanceCapacity'

WHAT!  I thought The Cloud was supposed to have "Infinite" capacity and resources.

Anyway,  I waited a few minutes an was able to successfully start the instance.

Additional Info:  I found the following reply from AWS regarding why this may occur. (AWS Log-in required):

 https://forums.aws.amazon.com/thread.jspa?threadID=37054&tstart=0

We'd like to provide some additional information about what you can do should you receive an insufficient capacity response when submitting a request to launch new instances.

There can be short periods of time when we are unable to accommodate instance requests that are targeted to a specific Availability Zone.  When a particular instance type experiences unexpected demand in an Availability Zone, our system must react by shifting capacity from one instance type to another.  This can result in short periods of insufficient capacity.  We incorporate this data into our capacity planning and try to manage all zones to have adequate capacity at all times.  The following steps will ensure that you will have the best experience launching Amazon EC2 instances when an initial insufficient capacity message is received:

1. Don't specify an Availability Zone in your request unless necessary.  By targeting a specific Availability Zone you eliminate our ability to satisfy that request by using our other available Availability Zones.  Please note that a single RunInstances call will allocate all instances within a single Availability Zone.

2. If you require a large number of instances for a particular job, please request them in batches. The best practice to follow here is to request 25% of your total cluster size at a time.  For example, if you want to launch 200 instances, launching 50 instances at a time will result in a better experience.

3. Try using a different instance type.  As capacity varies across instance types, attempting to launch difference instance types provides spill over capacity should your primary instance type be temporarily unavailable.

Regards,
Justin

1 comment:

  1. Thanks for providing this informative information you may also refer.
    http://www.s4techno.com/blog/2015/12/24/aws-rds-in-sql-server-5-minute-deploy/

    ReplyDelete