Learning center

Auto Scaling launch failed with insufficient capacity in one zone

When a scaling activity fails during a deploy or instance refresh, read its StatusMessage and Availability Zone before you change the launch template. A message that begins We currently do not have sufficient and names one zone points at EC2 capacity for that instance type there, which a new AMI or template version will not fix. An offering check then separates "no capacity right now" from "this type is not sold in this zone", and the group's subnets and instance types show how much room it has to work around either.

The signature and its neighbors#

EC2 Auto Scaling records each launch attempt as a scaling activity. A failed attempt has StatusCode Failed or Cancelled, and StatusMessage says why. AWS's launch-failure troubleshooting page lists several messages that arrive in the same place during a deploy and look alike at a glance. They point at different owners. Activity fields · DescribeScalingActivities · Instance launch failures

Message begins withWhat AWS says it meansWho acts
We currently do not have sufficient <instance type> capacity in the Availability Zone you requestedEC2 cannot supply that type in that zone at the moment. Capacity can shift within minutes.Wait, or let the group use other zones or types
There is no Spot capacity available that matches your request.Not enough spare Spot capacity in the pools the group can use. The Spot request keeps retrying.Add Spot pools: more types, more zones
Your requested instance type (<instance type>) is not supported in your requested Availability ZoneThe type is not offered in that zone. Waiting does not change this.Change zones or the type
<number of instances> instance(s) are already running.The account reached its Regional instance quota.Request a quota increase
The requested configuration is currently not supported.An option in the launch template is incompatible with the type, Region or zone.Fix the template; see launch template version failures

The wording is AWS's and can change, so match on the leading phrase and keep the whole message as evidence. Only the first two rows are capacity. The third looks like capacity but is a fixed fact about the zone, and the last two are account limits and configuration. This guide is one of the scaling entries in the signature table.

Read the failed activities and their zones#

Use a read-only profile and replace the uppercase placeholders. AWS keeps scaling activities for six weeks. The Status filter works only together with the group name. describe-scaling-activities · Retrieve an error message

aws autoscaling describe-scaling-activities \
  --profile PROFILE --region REGION --auto-scaling-group-name GROUP \
  --filters Name=Status,Values=Failed \
  --query 'Activities[].{start:StartTime,status:StatusCode,message:StatusMessage,details:Details,cause:Cause}' \
  --output json --no-cli-pager

Details is a JSON string that holds the subnet ID and Availability Zone of the attempt, so read the zone from it. Run the same command without the filter to see the successful launches in the same minutes. Capacity in one zone has a recognizable shape: every failure names the same zone and type, while launches in the group's other zones succeed.

Then read what the group is allowed to choose from. A group with one instance type has one capacity pool per zone, so a shortage in one zone leaves it few alternatives. AutoScalingGroup fields

aws autoscaling describe-auto-scaling-groups \
  --profile PROFILE --region REGION --auto-scaling-group-names GROUP \
  --query 'AutoScalingGroups[0].{zones:AvailabilityZones,subnets:VPCZoneIdentifier,template:LaunchTemplate,mixedTemplate:MixedInstancesPolicy.LaunchTemplate.LaunchTemplateSpecification,types:MixedInstancesPolicy.LaunchTemplate.Overrides[].InstanceType,requirements:MixedInstancesPolicy.LaunchTemplate.Overrides[].InstanceRequirements,desired:DesiredCapacity,instances:Instances[].{id:InstanceId,zone:AvailabilityZone,type:InstanceType,state:LifecycleState}}' \
  --output json --no-cli-pager

If requirements lists anything, the group selects types by attribute and has more than one pool per zone even though types is empty; the instances list shows which types it chose. If both are empty, the group launches only the instance type in its launch template.

Separate "no capacity now" from "not offered"#

describe-instance-type-offerings lists the zones where a type is sold. It says nothing about capacity at this moment, which is exactly why it is useful here: it rules the third row of the table in or out. describe-instance-type-offerings

aws ec2 describe-instance-type-offerings \
  --profile PROFILE --region REGION --location-type availability-zone \
  --filters Name=instance-type,Values=INSTANCE_TYPE \
  --query 'InstanceTypeOfferings[].Location' --output json --no-cli-pager
Failing zone in the offering listMessageReading
ListedWe currently do not have sufficient ...Temporary capacity shortage for this type in this zone
Not listed... is not supported in your requested Availability Zone ...The group's subnets include a zone that does not sell this type; it will fail every time
ListedThe requested configuration is currently not supported.Something in the template does not fit this type or location

What to change#

For a capacity shortage, AWS's first suggestions are to wait a few minutes and try again, to follow the zones the message recommends, and to launch fewer instances and add the rest later. The group keeps launching to close the gap between desired and actual capacity, and each attempt is a new activity, so a shortage that clears shows up as Successful launches in the same zone. Instance launch failures

The durable change is diversity. AWS calls multiple instance types a best practice because the group can then launch another type when one has insufficient capacity in the chosen zones. A mixed instances policy lists up to 40 types as launch template overrides, or describes instance requirements and lets the group match types. The group first balances across its zones and then picks types by the allocation strategy, so adding subnets in more zones widens the choice as well. Mixed instances groups · Allocation strategies · LaunchTemplateOverrides

Each added type must work with the template's AMI. An Arm-based Graviton type needs an Arm AMI, and AWS documents an architecture-mismatch launch error for the opposite case, which would turn a capacity problem into a configuration one. Run the offering check for every type you add. AMI issues

Confirm on the next launches: a Successful activity for each new instance, instances InService in the zones and types you expected, and no further capacity messages for that zone during the rollout.

An illustrative sequence#

This is a fictional record. The group orders-asg runs six c6i.2xlarge instances across three zones and has no overrides. An instance refresh to launch template version 8 started at 14:00.

TimeActivityZoneStatusMessage
14:01Launchus-east-1aSuccessful
14:01Launchus-east-1cFailedThe capacity message for c6i.2xlarge in us-east-1c
14:03Launchus-east-1bSuccessful
14:04Launchus-east-1cFailedSame message

Version 8 launched in two zones within the same minutes, so the template and AMI work on this type. The failures stay in one zone with the capacity message, and the type is listed for us-east-1c. Adding c6a.2xlarge and m6i.2xlarge as overrides gives the group other pools in that zone.

Change one field and the reading changes. If the 14:01 failure in us-east-1c had said the type is not supported in your requested Availability Zone, the group's subnets include a zone that never sells this type, and retrying would not help. If every zone had failed with The requested configuration is currently not supported., version 8 is the cause and the next read is the template diff.

Where this reading stops#

A capacity message describes one attempt at one time. A later success in the same zone shows that capacity returned; it does not show that every type you might add will launch. The offering list shows where a type is sold, never whether capacity exists. If an instance refresh was running, the group may have run below desired capacity during the shortage: when MaxHealthyPercentage is omitted, the refresh terminates an instance and launches its replacement at the same time. Setting it explicitly lets the group launch first when it cannot otherwise honor both bounds. For the refresh's own status and how it failed, see instance refresh failures. RefreshPreferences

Questions#

Does an insufficient capacity error mean my launch template is wrong?

No. That message means EC2 could not supply the instance type in that Availability Zone at that moment. If the same template version launched successfully in other zones during the same minutes, the template works on that type.

Will Auto Scaling keep retrying after an insufficient capacity failure?

Yes. The group keeps launching to close the gap between desired and actual capacity, and each attempt is recorded as a new scaling activity. Capacity can shift within minutes, but a group limited to one type and few zones may wait a long time.

How do I stop one Availability Zone's capacity from blocking a deploy?

Give the group more choices: add instance types through a mixed instances policy, or add subnets in more zones. Check that each added type is offered in those zones and matches the AMI's architecture before the next deploy.

One month of free code review.

New organizations get one calendar month of hosted code review for private and public GitHub repositories. No card or cloud connection required. Eligibility and fair-use terms.

Start free with GitHub

Related reading