{
  "id": "terraform/invalid-aws-provider-region",
  "signature": "Error: error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS Provider found",
  "signature_zh": "错误：配置 Terraform AWS Provider 时出错：未找到有效的凭证源",
  "regex": "error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS Provider found",
  "domain": "terraform",
  "category": "auth_error",
  "subcategory": null,
  "root_cause": "AWS provider cannot locate valid credentials in environment variables, shared credentials file, or IAM role.",
  "root_cause_type": "generic",
  "root_cause_zh": "AWS 提供程序无法在环境变量、共享凭证文件或 IAM 角色中找到有效凭证。",
  "versions": [
    {
      "version": "AWS Provider v5.0+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Terraform v1.4+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Empty values are treated as invalid; provider still fails to authenticate.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Provider checks the profile but cannot load credentials, still fails.",
      "fail_rate": 0.5,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Set AWS credentials via environment variables: export AWS_ACCESS_KEY_ID=xxx; export AWS_SECRET_ACCESS_KEY=xxx",
      "success_rate": 0.95,
      "how": "Set AWS credentials via environment variables: export AWS_ACCESS_KEY_ID=xxx; export AWS_SECRET_ACCESS_KEY=xxx",
      "condition": "",
      "sources": []
    },
    {
      "action": "Configure ~/.aws/credentials with a default profile and set AWS_PROFILE=default",
      "success_rate": 0.9,
      "how": "Configure ~/.aws/credentials with a default profile and set AWS_PROFILE=default",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use IAM role for EC2 instance (if running on AWS)",
      "success_rate": 0.85,
      "how": "Use IAM role for EC2 instance (if running on AWS)",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "通过环境变量设置 AWS 凭证：export AWS_ACCESS_KEY_ID=xxx; export AWS_SECRET_ACCESS_KEY=xxx",
    "配置 ~/.aws/credentials 使用默认配置文件并设置 AWS_PROFILE=default"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://registry.terraform.io/providers/hashicorp/aws/latest/docs#authentication-and-configuration",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-01-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}