{
  "id": "cloud/aws-sqs-message-size-exceeded",
  "signature": "AWS.SQS.SdkException: Message size exceeds the maximum allowed (256 KB)",
  "signature_zh": "AWS.SQS.SdkException：消息大小超过最大允许值（256 KB）",
  "regex": "Message size exceeds the maximum allowed \\(256 KB\\)",
  "domain": "cloud",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "Amazon SQS limits individual message payloads to 256 KB (including metadata); sending larger messages triggers this exception.",
  "root_cause_type": "generic",
  "root_cause_zh": "Amazon SQS 将单个消息负载限制为 256 KB（包括元数据）；发送更大的消息会触发此异常。",
  "versions": [
    {
      "version": "AWS SDK for Python 1.32.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "AWS SDK for Java 2.21.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "SQS API 2012-11-05",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Compression is not transparent; the receiver must implement decompression, and the raw size limit still applies.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "SQS does not guarantee order across multiple messages unless using FIFO queues with a message group ID.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Store the large payload in Amazon S3 and send the S3 object key in the SQS message. Example: upload to S3, then send JSON {'s3_bucket': 'my-bucket', 's3_key': 'path/to/payload.json'}.",
      "success_rate": 0.95,
      "how": "Store the large payload in Amazon S3 and send the S3 object key in the SQS message. Example: upload to S3, then send JSON {'s3_bucket': 'my-bucket', 's3_key': 'path/to/payload.json'}.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use the SQS Extended Client Library (Java or Python) which automatically handles S3-backed large messages.",
      "success_rate": 0.9,
      "how": "Use the SQS Extended Client Library (Java or Python) which automatically handles S3-backed large messages.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Reduce the message payload by removing unnecessary metadata or using a more compact format like Protocol Buffers instead of JSON.",
      "success_rate": 0.75,
      "how": "Reduce the message payload by removing unnecessary metadata or using a more compact format like Protocol Buffers instead of JSON.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "将大负载存储在 Amazon S3 中，并在 SQS 消息中发送 S3 对象键。例如：上传到 S3，然后发送 JSON {'s3_bucket': 'my-bucket', 's3_key': 'path/to/payload.json'}。",
    "使用 SQS Extended Client Library（Java 或 Python），自动处理基于 S3 的大消息。",
    "通过移除不必要的元数据或使用更紧凑的格式（如 Protocol Buffers 而非 JSON）来减少消息负载。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSDeveloperGuide/quotas-messages.html",
  "official_doc_section": null,
  "error_code": "AWS.SQS.SdkException",
  "verification_tier": "ai_generated",
  "confidence": 0.88,
  "fix_success_rate": 0.9,
  "resolvable": "true",
  "first_seen": "2023-05-20",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}