The Scenario
You’re running a production deploy on a Tuesday afternoon, scaling up an Auto Scaling Group to handle increased load. The launch of new EC2 instances fails with InsufficientInstanceCapacity — but only in one specific Availability Zone. Your CI/CD pipeline shows a failed step, and users are starting to see 503s.
Symptoms
InsufficientInstanceCapacityerror when callingRunInstancesorCreateAutoScalingGroup- AWS Console shows “Insufficient capacity” in the EC2 instance launch wizard
- Auto Scaling events show “Failed” with reason: “We currently do not have sufficient capacity in the Availability Zone you requested”
Root Cause
AWS EC2 has finite physical server capacity per Availability Zone per instance type. This error occurs when AWS does not have enough available servers of that specific instance type (e.g., t3.medium, m5.large) in the requested AZ to fulfill your request. This is a transient capacity constraint in AWS’s infrastructure, not a problem with your account limits or configuration.
Resolution (Step-by-Step)
-
Retry the launch immediately — capacity can free up within minutes. Use the AWS CLI to retry:
aws ec2 run-instances --instance-type t3.medium --availability-zone us-east-1a --image-id ami-0abcdef1234567890 --count 2 -
Launch in a different Availability Zone — specify a different AZ in the same region:
aws ec2 run-instances --instance-type t3.medium --availability-zone us-east-1b --image-id ami-0abcdef1234567890 --count 2 -
Use a different instance type — choose a similar type (e.g.,
t3a.mediuminstead oft3.medium):aws ec2 run-instances --instance-type t3a.medium --availability-zone us-east-1a --image-id ami-0abcdef1234567890 --count 2 -
Modify Auto Scaling Group to use multiple AZs — update the ASG to spread across AZs:
aws autoscaling update-auto-scaling-group --auto-scaling-group-name my-asg --availability-zones us-east-1a us-east-1b us-east-1c -
Use On-Demand Capacity Reservations — reserve capacity in advance for critical workloads:
aws ec2 create-capacity-reservation --instance-type t3.medium --instance-platform EC2 --availability-zone us-east-1a --instance-count 5
Why This Sometimes Doesn’t Work
If you’re using Spot Instances, the error can persist even after retrying because Spot capacity is more volatile. Switching to On-Demand instances in the same AZ often resolves it immediately. Also, some instance types (like t3.micro) are more constrained in certain regions — if you’re stuck, try a different family entirely (e.g., t3.large instead of t3.medium).
Verification
Confirm the instances launched successfully:
aws ec2 describe-instances --filters "Name=instance-state-name,Values=running" --query "Reservations[].Instances[].InstanceId"
Expected output: list of running instance IDs, no errors.
Common Follow-up Questions
Q: Does this mean my account is throttled?
No, this is an AWS capacity issue, not your account limit. Check your EC2 service quotas separately.
Q: How long does it take for capacity to free up?
Usually minutes to hours. Retry every 5-10 minutes, or try a different AZ/instance type.
Q: Can I reserve capacity to avoid this?
Yes, use On-Demand Capacity Reservations for predictable workloads, or Savings Plans for discounted pricing with priority access.
Prevent This in the Future
Set up proactive monitoring on EC2 launch failures and Auto Scaling events to catch capacity issues before they impact users. Better Stack provides real-time incident management and alerting for AWS infrastructure, helping you detect and respond to launch failures faster.
Set up uptime monitoring and alerts with Better Stack