{
  "id": "aws/lambda-invoke-response-stream-too-large",
  "signature": "ClientError: An error occurred (RequestEntityTooLargeException) when calling the InvokeWithResponseStream operation: Response payload size exceeded maximum allowed payload size (6291556 bytes)",
  "signature_zh": "ClientError：调用 InvokeWithResponseStream 操作时发生错误 (RequestEntityTooLargeException)：响应负载大小超过允许的最大负载大小 (6291556 字节)",
  "regex": "RequestEntityTooLargeException.*InvokeWithResponseStream.*Response payload size exceeded",
  "domain": "aws",
  "category": "resource_error",
  "subcategory": null,
  "root_cause": "Lambda response streaming payload exceeded the 6 MB limit for streamed responses, causing the invocation to fail.",
  "root_cause_type": "generic",
  "root_cause_zh": "Lambda 响应流式传输负载超过了 6 MB 的流式响应限制，导致调用失败。",
  "versions": [
    {
      "version": "Lambda 2015-03-31",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "AWS SDK for JavaScript 3.600.0",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Node.js 20.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "Increase the Lambda function's timeout or memory.",
      "why_fails": "The error is about payload size, not execution duration or memory.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "Use synchronous Invoke instead of InvokeWithResponseStream.",
      "why_fails": "Synchronous Invoke has a 6 MB limit as well, and the error will persist.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "Compress the response payload with gzip.",
      "why_fails": "Lambda does not automatically decompress gzip; the client would need to handle it, and the limit applies to the raw payload before compression.",
      "fail_rate": 0.6,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Split the response into multiple chunks using Lambda response streaming, sending smaller payloads per chunk, or use pagination in the client to request data in parts.",
      "success_rate": 0.82,
      "how": "Split the response into multiple chunks using Lambda response streaming, sending smaller payloads per chunk, or use pagination in the client to request data in parts.",
      "condition": "",
      "sources": []
    },
    {
      "action": "Store the large response in S3 and return a pre-signed URL to the client, avoiding the Lambda response size limit altogether.",
      "success_rate": 0.9,
      "how": "Store the large response in S3 and return a pre-signed URL to the client, avoiding the Lambda response size limit altogether.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "使用 Lambda 响应流式传输将响应拆分为多个块，每个块发送较小的负载，或在客户端使用分页来分部分请求数据。",
    "将大响应存储在 S3 中，并向客户端返回预签名 URL，完全避免 Lambda 响应大小限制。"
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://docs.aws.amazon.com/lambda/latest/dg/invocation-response-streaming.html",
  "official_doc_section": null,
  "error_code": "RequestEntityTooLargeException",
  "verification_tier": "ai_generated",
  "confidence": 0.86,
  "fix_success_rate": 0.82,
  "resolvable": "true",
  "first_seen": "2024-01-15",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}