{
  "id": "aws/lambda-invoke-payload-too-large",
  "signature": "ClientError: An error occurred (RequestEntityTooLargeException) when calling the Invoke operation: Request must be smaller than 6291556 bytes for the Invoke operation",
  "signature_zh": "ClientError：调用 Invoke 操作时出错（RequestEntityTooLargeException）：对于 Invoke 操作，请求必须小于 6291556 字节",
  "regex": "ClientError: An error occurred \\(RequestEntityTooLargeException\\) when calling the Invoke operation: Request must be smaller than \\d+ bytes",
  "domain": "aws",
  "category": "runtime_error",
  "subcategory": null,
  "root_cause": "The payload sent to AWS Lambda via synchronous Invoke exceeds the maximum request size of 6 MB (6,291,556 bytes), causing the API to reject the invocation.",
  "root_cause_type": "generic",
  "root_cause_zh": "通过同步 Invoke 发送到 AWS Lambda 的负载超过了最大请求大小 6 MB（6,291,556 字节），导致 API 拒绝调用。",
  "versions": [
    {
      "version": "lambda-2015-03-31",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "boto3-1.34.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increase Lambda function timeout or memory",
      "why_fails": "Timeout and memory limits affect execution, not the payload size limit; the API rejects before the function runs.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    },
    {
      "action": "Compress the payload with gzip but keep the same structure",
      "why_fails": "Lambda Invoke API doesn't automatically decompress; the function receives compressed bytes, which may break parsing unless handled explicitly.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Use asynchronous invocation (Event invocation) which supports up to 256 KB payload, or use S3 to pass large payloads: upload to S3 and pass the object key to Lambda.",
      "success_rate": 0.9,
      "how": "Use asynchronous invocation (Event invocation) which supports up to 256 KB payload, or use S3 to pass large payloads: upload to S3 and pass the object key to Lambda.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Split the payload into smaller chunks and invoke Lambda multiple times, aggregating results client-side.",
      "success_rate": 0.8,
      "how": "Split the payload into smaller chunks and invoke Lambda multiple times, aggregating results client-side.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Use Lambda with a function URL or API Gateway, which can handle larger payloads (up to 10 MB) and stream data.",
      "success_rate": 0.85,
      "how": "Use Lambda with a function URL or API Gateway, which can handle larger payloads (up to 10 MB) and stream data.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "使用异步调用（Event 调用）支持最多 256 KB 负载，或使用 S3 传递大负载：上传到 S3 并将对象键传递给 Lambda。",
    "将负载分成较小的块并多次调用 Lambda，在客户端聚合结果。",
    "使用带有函数 URL 或 API Gateway 的 Lambda，可以处理更大的负载（最多 10 MB）并流式传输数据。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.aws.amazon.com/lambda/latest/dg/gettingstarted-limits.html",
  "official_doc_section": null,
  "error_code": "RequestEntityTooLargeException",
  "verification_tier": "ai_generated",
  "confidence": 0.87,
  "fix_success_rate": 0.85,
  "resolvable": "true",
  "first_seen": "2023-03-05",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}