highProductionSymptom-first#ec2#capacity#scale#launch

InsufficientInstanceCapacity — unable to launch or scale

ec2 run-instances returns InsufficientInstanceCapacity

Likely source:scalingavailability

Focused incident mode — strips away everything but this runbook.

Symptoms

  • ec2 run-instances returns InsufficientInstanceCapacity
  • ASG scaling activities fail with the same error
  • Spot requests pending or failing in specific AZs

Capacity shortage is regional and temporary. If the ASG only spans one AZ you are structurally more exposed — multi-AZ is the durable fix, not retrying harder.

Evidence to grab

Collect these artifacts before you change anything — they prove (or rule out) each cause.

  • Exact launch error

    aws ec2 run-instances --image-id <AMI> --instance-type <TYPE> --subnet-id <SUBNET-ID> --region <REGION>
  • ASG activity errors

    aws autoscaling describe-scaling-activities --auto-scaling-group-name <ASG-NAME> --max-items 5

Diagnostic flow

Run the steps in order, marking each claim confirmed or refuted. The evidence you gather feeds the ranked causes below.

Guided decision tree is ready.

Steps with commands, expected output, and pass/fail branches.

Ranked root causes

Evidence checklist

  • Error message includes the AZ name
  • describe-instance-type-offerings shows the type missing from that AZ

Confirm before fixing

aws ec2 describe-instance-type-offerings --location-type availability-zone --filters Name=instance-type,Values=<INSTANCE-TYPE> --region <REGION>
READ

Confirm the type is absent from the AZ

Fix

aws ec2 run-instances --image-id <AMI> --instance-type <INSTANCE-TYPE> --subnet-id <OTHER-AZ-SUBNET-ID> --region <REGION>
CHANGE

Launch in a currently-supplied AZ

Resolution runbook

Apply from top to bottom after the cause is confirmed. Review every command before running it — risk tags are shown on each.

1
aws autoscaling describe-scaling-activities --auto-scaling-group-name <ASG-NAME> --max-items 5
READ

Confirm the fleet error

2
aws ec2 describe-instance-type-offerings --location-type availability-zone --filters Name=instance-type,Values=<INSTANCE-TYPE> --region <REGION>
READ

Find AZs that can host the type right now

3
aws autoscaling update-auto-scaling-group --auto-scaling-group-name <ASG-NAME> --vpc-zone-identifier "<SUBNET-A>,<SUBNET-B>,<SUBNET-C>"
CHANGE

Broaden the AZ strategy

4
aws autoscaling start-instance-refresh --auto-scaling-group-name <ASG-NAME> --strategy Rolling
CHANGE

If swapping instance type, run a rolling refresh to apply it

Prevention

  • Run ASGs across 3 AZs with flexible instance-type selection (mixed instances policy).
  • Use Capacity Block / On-Demand Capacity Reservations for rare or mandatory types.
  • Set instance market options or fallback types in the launch template.

Commands marked READ CHANGE DESTRUCTIVE — never run DESTRUCTIVE commands against production data you cannot restore. Copy → verify → execute.