{
  "id": "aws/ec2-instance-connect-timeout",
  "signature": "Connection to EC2 instance timed out while using Instance Connect",
  "signature_zh": "使用实例连接时，与EC2实例的连接超时",
  "regex": "Connection to EC2 instance timed out while using Instance Connect",
  "domain": "aws",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "EC2 Instance Connect service cannot reach the instance due to missing or misconfigured security group rules, lack of public IP, or network ACL blocking.",
  "root_cause_type": "generic",
  "root_cause_zh": "由于安全组规则缺失或配置错误、缺少公网IP或网络ACL阻止，EC2 Instance Connect服务无法连接到实例。",
  "versions": [
    {
      "version": "ec2-instance-connect-1.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "aws-cli-2.15.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "amazon-ec2-2024",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "超时是网络层问题，客户端设置无法绕过AWS网络策略。",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "重启实例不会修复安全组规则或IAM权限配置错误。",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Verify that the security group attached to the instance allows inbound TCP traffic on port 22 from the Instance Connect IP ranges. Use: aws ec2 describe-security-groups --group-ids sg-xxx, then add rule: aws ec2 authorize-security-group-ingress --group-id sg-xxx --protocol tcp --port 22 --cidr 18.206.107.24/29",
      "success_rate": 0.8,
      "how": "Verify that the security group attached to the instance allows inbound TCP traffic on port 22 from the Instance Connect IP ranges. Use: aws ec2 describe-security-groups --group-ids sg-xxx, then add rule: aws ec2 authorize-security-group-ingress --group-id sg-xxx --protocol tcp --port 22 --cidr 18.206.107.24/29",
      "condition": "",
      "sources": []
    },
    {
      "action": "Ensure the instance has a public IP address (if connecting from outside VPC) or use a bastion host. If using EC2 Instance Connect without public IP, enable VPC endpoint for EC2 Instance Connect.",
      "success_rate": 0.75,
      "how": "Ensure the instance has a public IP address (if connecting from outside VPC) or use a bastion host. If using EC2 Instance Connect without public IP, enable VPC endpoint for EC2 Instance Connect.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Verify that the security group attached to the instance allows inbound TCP traffic on port 22 from the Instance Connect IP ranges. Use: aws ec2 describe-security-groups --group-ids sg-xxx, then add rule: aws ec2 authorize-security-group-ingress --group-id sg-xxx --protocol tcp --port 22 --cidr 18.206.107.24/29",
    "Ensure the instance has a public IP address (if connecting from outside VPC) or use a bastion host. If using EC2 Instance Connect without public IP, enable VPC endpoint for EC2 Instance Connect."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-connect-set-up.html",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "true",
  "first_seen": "2023-06-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}