{
  "id": "cloud/aws-sqs-redrive-policy-invalid",
  "signature": "InvalidParameterValue: The redrive policy for queue 'my-queue' is invalid. Reason: The dead-letter queue ARN is not valid.",
  "signature_zh": "InvalidParameterValue：队列 'my-queue' 的重驱策略无效。原因：死信队列 ARN 无效。",
  "regex": "InvalidParameterValue: The redrive policy for queue .* is invalid",
  "domain": "cloud",
  "category": "config_error",
  "subcategory": null,
  "root_cause": "The dead-letter queue ARN specified in the redrive policy does not exist, is in a different region, or the source queue does not have permission to send messages to it.",
  "root_cause_type": "generic",
  "root_cause_zh": "重驱策略中指定的死信队列 ARN 不存在、位于不同区域，或者源队列没有向其发送消息的权限。",
  "versions": [
    {
      "version": "AWS SDK for Python (boto3): 1.34.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "SQS: 2012-11-05",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Terraform AWS Provider: 5.70.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Recreating queues does not fix the ARN mismatch or permission issue; the new queues have different ARNs unless explicitly specified.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "This only delays the problem; messages still get stuck in the source queue if processing fails repeatedly, and the redrive policy remains invalid.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The redrive policy requires an ARN, not a URL; using a URL causes the same invalid parameter error.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Verify the dead-letter queue ARN using AWS CLI: aws sqs get-queue-attributes --queue-url <DLQ_URL> --attribute-names QueueArn. Then update the redrive policy with the correct ARN.",
      "success_rate": 0.95,
      "how": "Verify the dead-letter queue ARN using AWS CLI: aws sqs get-queue-attributes --queue-url <DLQ_URL> --attribute-names QueueArn. Then update the redrive policy with the correct ARN.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Attach a resource-based policy to the dead-letter queue allowing the source queue to send messages: aws sqs set-queue-attributes --queue-url <DLQ_URL> --attributes Policy='{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"sqs:SendMessage\",\"Resource\":\"<DLQ_ARN>\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"<SOURCE_ARN>\"}}}]}'",
      "success_rate": 0.9,
      "how": "Attach a resource-based policy to the dead-letter queue allowing the source queue to send messages: aws sqs set-queue-attributes --queue-url <DLQ_URL> --attributes Policy='{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"sqs:SendMessage\",\"Resource\":\"<DLQ_ARN>\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"<SOURCE_ARN>\"}}}]}'",
      "condition": "",
      "sources": []
    },
    {
      "action": "Ensure both queues are in the same AWS region; if not, create a new dead-letter queue in the same region as the source queue.",
      "success_rate": 0.85,
      "how": "Ensure both queues are in the same AWS region; if not, create a new dead-letter queue in the same region as the source queue.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "使用 AWS CLI 验证死信队列 ARN：aws sqs get-queue-attributes --queue-url <DLQ_URL> --attribute-names QueueArn。然后使用正确的 ARN 更新重驱策略。",
    "向死信队列附加基于资源的策略，允许源队列发送消息：aws sqs set-queue-attributes --queue-url <DLQ_URL> --attributes Policy='{\"Version\":\"2012-10-17\",\"Statement\":[{\"Effect\":\"Allow\",\"Principal\":\"*\",\"Action\":\"sqs:SendMessage\",\"Resource\":\"<DLQ_ARN>\",\"Condition\":{\"ArnEquals\":{\"aws:SourceArn\":\"<SOURCE_ARN>\"}}}]}'",
    "确保两个队列位于同一 AWS 区域；如果不在，则在源队列所在区域创建新的死信队列。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/sqs-dead-letter-queues.html",
  "official_doc_section": null,
  "error_code": "InvalidParameterValue",
  "verification_tier": "ai_generated",
  "confidence": 0.84,
  "fix_success_rate": 0.88,
  "resolvable": "true",
  "first_seen": "2024-12-01",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}