InsufficientInstanceCapacity aws resource_error ai_generated partial

InsufficientInstanceCapacity: We currently do not have sufficient capacity in the Availability Zone you requested

ID: aws/ec2-insufficient-instance-capacity

Also available as: JSON · Markdown · 中文
80%Fix Rate
85%Confidence
1Evidence
2023-06-15First Seen

Version Compatibility

VersionStatusIntroducedDeprecatedNotes
ec2-2024-01-01 active
aws-cli/2.17.0 active

Root Cause

AWS EC2 fleet in the specified Availability Zone lacks available compute capacity for the requested instance type, often due to high demand or resource constraints.

generic

中文

指定可用区中的 AWS EC2 实例集群缺乏所请求实例类型的可用计算容量,通常是由于高需求或资源限制。

Official Documentation

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/troubleshooting-launch.html#insufficient-instance-capacity

Workarounds

  1. 70% success Change instance type to a similar but less popular one (e.g., from t3.medium to t3.large or t4g.medium) and relaunch.
    Change instance type to a similar but less popular one (e.g., from t3.medium to t3.large or t4g.medium) and relaunch.
  2. 80% success Use a different Availability Zone or enable 'No Preferred AZ' in Auto Scaling groups. For CLI: `aws ec2 run-instances --placement AvailabilityZone=us-east-1b`
    Use a different Availability Zone or enable 'No Preferred AZ' in Auto Scaling groups. For CLI: `aws ec2 run-instances --placement AvailabilityZone=us-east-1b`
  3. 90% success Use On-Demand Capacity Reservations or Savings Plans to reserve capacity in advance. Create a reservation: `aws ec2 create-capacity-reservation --instance-type t3.medium --availability-zone us-east-1a --instance-count 5`
    Use On-Demand Capacity Reservations or Savings Plans to reserve capacity in advance. Create a reservation: `aws ec2 create-capacity-reservation --instance-type t3.medium --availability-zone us-east-1a --instance-count 5`

中文步骤

  1. 更改实例类型为类似但不太流行的类型(例如,从 t3.medium 改为 t3.large 或 t4g.medium)并重新启动。
  2. 使用不同的可用区,或在 Auto Scaling 组中启用“无首选可用区”。对于 CLI:`aws ec2 run-instances --placement AvailabilityZone=us-east-1b`
  3. 使用按需容量预留或 Savings Plans 提前预留容量。创建预留:`aws ec2 create-capacity-reservation --instance-type t3.medium --availability-zone us-east-1a --instance-count 5`

Dead Ends

Common approaches that don't work:

  1. Retry the same request repeatedly without changes 95% fail

    AWS capacity is per-AZ and per-instance-type; retrying the same request won't allocate new capacity if it's exhausted across that AZ.

  2. Increase the instance count in the same request expecting partial fulfillment 90% fail

    The error is a hard capacity check; AWS rejects the entire launch request if any instance cannot be placed, not a partial fulfillment.