{
  "id": "aws/ec2-insufficient-ip-addresses",
  "signature": "Insufficient IP addresses in subnet: The subnet does not have enough free IP addresses to support the requested number of ENIs.",
  "signature_zh": "子网中 IP 地址不足：子网没有足够的空闲 IP 地址来支持请求的 ENI 数量。",
  "regex": "Insufficient IP addresses in subnet",
  "domain": "aws",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "The VPC subnet has exhausted its available IP address space, preventing new ENIs or EC2 instances from launching.",
  "root_cause_type": "generic",
  "root_cause_zh": "VPC 子网已耗尽可用 IP 地址空间，阻止了新的 ENI 或 EC2 实例启动。",
  "versions": [
    {
      "version": "EC2 API 2016-11-15",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "AWS VPC CNI 1.12.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Delete the subnet and recreate it with a larger CIDR",
      "why_fails": "Deleting a subnet with running resources is impossible; you must first terminate all resources.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Manually assign Elastic IPs to free up private IPs",
      "why_fails": "Elastic IPs are public IPs and don't affect private IP address usage in subnets.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Increase subnet size via AWS Console (no such option)",
      "why_fails": "Subnet CIDR size is fixed at creation; it cannot be changed afterward.",
      "fail_rate": 1.0,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Release unused ENIs: list ENIs with `aws ec2 describe-network-interfaces --filters Name=subnet-id,Values=subnet-xxx` and delete unattached ones with `aws ec2 delete-network-interface --network-interface-id eni-xxx`.",
      "success_rate": 0.8,
      "how": "Release unused ENIs: list ENIs with `aws ec2 describe-network-interfaces --filters Name=subnet-id,Values=subnet-xxx` and delete unattached ones with `aws ec2 delete-network-interface --network-interface-id eni-xxx`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Create additional subnets in the same VPC with a larger or additional CIDR block. Add a secondary CIDR to VPC: `aws ec2 associate-vpc-cidr-block --vpc-id vpc-xxx --cidr-block 10.0.2.0/24`. Then create new subnets from the new range.",
      "success_rate": 0.85,
      "how": "Create additional subnets in the same VPC with a larger or additional CIDR block. Add a secondary CIDR to VPC: `aws ec2 associate-vpc-cidr-block --vpc-id vpc-xxx --cidr-block 10.0.2.0/24`. Then create new subnets from the new range.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Reduce IP consumption: use smaller EC2 instance types that require fewer ENIs, or enable 'assign public IP' only when necessary to avoid extra private IP reservation.",
      "success_rate": 0.7,
      "how": "Reduce IP consumption: use smaller EC2 instance types that require fewer ENIs, or enable 'assign public IP' only when necessary to avoid extra private IP reservation.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "释放未使用的 ENI：使用 `aws ec2 describe-network-interfaces --filters Name=subnet-id,Values=subnet-xxx` 列出 ENI，并使用 `aws ec2 delete-network-interface --network-interface-id eni-xxx` 删除未附加的 ENI。",
    "在同一个 VPC 中创建具有更大或额外 CIDR 块的新子网。向 VPC 添加辅助 CIDR：`aws ec2 associate-vpc-cidr-block --vpc-id vpc-xxx --cidr-block 10.0.2.0/24`。然后从新范围创建新子网。",
    "减少 IP 消耗：使用需要较少 ENI 的较小 EC2 实例类型，或仅在必要时启用“分配公有 IP”，以避免额外的私有 IP 预留。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.aws.amazon.com/vpc/latest/userguide/subnet-sizing.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.82,
  "resolvable": "true",
  "first_seen": "2023-09-12",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}