EC2 will not launch or start an instance: InsufficientInstanceCapacity
InsufficientInstanceCapacityShort answer
InsufficientInstanceCapacity means AWS has no spare On-Demand capacity for your request right now. It is not your quota and not your account. Wait a few minutes and retry, ask for fewer instances per request, leave the Availability Zone unset, or pick another instance type and resize later.
Fix it fast
1Find out which cause you have
Read the full error text and note two things: which instance type you asked for and which Availability Zone it names. Then confirm what the stopped or failed instance is configured with.
aws ec2 describe-instances --instance-id i-1234567890abcdef02Match what you see, then jump to its fix
- 1
InsufficientInstanceCapacity on a launch or on starting a stopped instance, with no change on your sideA short-lived shortage of On-Demand capacityFix - 2
The error names a specific zone, for example one you picked in the launch wizard or through a subnetThe request is pinned to one Availability Zone that is out of capacityFix - 3
The same instance type keeps failing while other types launch fineThat instance type is the one that is scarceFix
- 1
What does the error look like?
InsufficientInstanceCapacityYou get the InsufficientInstanceCapacity error when you try to launch a new instance or restart a stopped instance
Cause 1 of 3
A short-lived shortage of On-Demand capacity
1Check
The AWS troubleshooting page says this error means AWS does not currently have enough On-Demand capacity to fulfil the request, and that capacity can shift often. Nothing in your account is wrong.
aws ec2 describe-instances --instance-id i-1234567890abcdef02Fix
Wait a few minutes and send the request again. If you asked for many instances in one request, split it: for example 3 requests of 5 instead of 1 request of 15, or 15 requests of 1.
aws ec2 start-instances --instance-ids i-1234567890abcdef03Verify
The instance leaves the pending state and reaches running.
aws ec2 describe-instance-status --instance-ids i-1234567890abcdef0Confirmed by docs.aws.amazon.com
Cause 2 of 3
The request is pinned to one Availability Zone that is out of capacity
1Check
A launch that fixes the Availability Zone can only use that zone's pool. Look at which zone or subnet your launch template, script or console choice uses.
aws ec2 describe-instances --instance-id i-1234567890abcdef02Fix
For a new launch, submit the request again without naming an Availability Zone, so EC2 can place it where capacity exists. If you must use a particular subnet, try the request once more later; the zone may recover.
aws ec2 run-instances --image-id ami-0abcdef1234567890 --instance-type t3.micro --count 13Verify
The new instance reaches running in whichever zone EC2 chose.
aws ec2 describe-instance-status --include-all-instancesConfirmed by docs.aws.amazon.com
Cause 3 of 3
That instance type is the one that is scarce
1Check
The AWS page lists a different instance type as a fix, so a request for one particular type can fail while another type is available.
aws ec2 describe-instances --instance-id i-1234567890abcdef02Fix
Launch with a different instance type, and resize later if you need to. For an existing EBS-backed instance that will not start, stop it, change its instance type, then start it again. The instance must be stopped before the type can be changed; if the type you want is missing from the list, it is not compatible with the instance's configuration.
aws ec2 start-instances --instance-ids i-1234567890abcdef03Verify
The instance shows running with the new type.
aws ec2 describe-instances --instance-id i-1234567890abcdef0Confirmed by docs.aws.amazon.com
How do I stop it coming back?
- Do not pin production launches to one Availability Zone unless you must; let EC2 or an Auto Scaling group spread them.
- List more than one acceptable instance type in your launch tooling so a shortage of one does not stop a deploy.
- Keep start-up scripts retrying with a short delay instead of failing on the first capacity error.
- Remember that stopping and starting an instance moves it to new hardware and can drop a public IPv4 address that is not an Elastic IP.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- Dispatch ProA real-time logistics platform: Flutter apps, Spring Boot services and a Kafka event pipeline on AWS.
- RaheebA consumer app shipped to both stores from one Flutter codebase on a .NET and Azure back end.
- Loade DriverThe driver side of a delivery platform: live jobs, routing and earnings, past 5K Google Play downloads.
Related fixes
Servers
ssh to an EC2 instance hangs and ends in Connection timed out
Network error: Connection timed out
A timeout means your packets never got an answer, so this is a network path problem, not a key problem.
4 causes, each with a fixServers
Status code 460 on an AWS Application Load Balancer
elb_status_code 460 in ALB access logs
A 460 is generated by the load balancer, not by your app.
3 causes, each with a fixServers
Application Load Balancer returns 504 for requests to EC2 instances
HTTPCode_ELB_504_Count
A 504 from an Application Load Balancer means it could not get an answer from a target in time.
4 causes, each with a fixServers
Apache has a certificate, but https:// does not open
No line with :443 in the output of ss -ltnp
HTTPS needs four things at once: mod_ssl loaded, Apache listening on 443, a virtual host on 443 with SSLEngine on, and a firewall that lets 443 in.
4 causes, each with a fixServers
aws emr --steps fails: Error parsing parameter, Expected '=', received 'EOF'
Error parsing parameter '--steps': Expected: '=', received: 'EOF' for input:
The AWS CLI tried to read your option as shorthand key=value pairs and ran out of text where it expected an equals sign.
3 causes, each with a fixServers
AWS CLI says you must specify a region
You must specify a region. You can also configure your region by running "aws configure".
The AWS CLI sends every request to one region and has none to use.
4 causes, each with a fix