Skip to content

PP-1493 Lambda handler fails with 413 error: response payload exceeds 6MB limit #63

@tlmader

Description

@tlmader

LambdaRuntimeError

Failed to post handler success response. Http response code: 413. {"errorMessage":"Exceeded maximum allowed payload size (6291556 bytes).","errorType":"RequestEntityTooLarge"}

Stack Trace

No stack trace available

Logs — Oct 29, 2025

START RequestId: e56f2ba8-155b-4fef-9186-3bd67b8dd9ed Version: $LATEST

e56f2ba8-155b-4fef-9186-3bd67b8dd9ed INFO Getting image: protected/us-east-1:07c0bd29-b67b-cfe3-8f88-af9e1f29d911/8106150e-206b-467d-9a7c-706ee6e4ec3d/nicks-mto-horween-spokane-honey-1759363548-nesting.jpg

e56f2ba8-155b-4fef-9186-3bd67b8dd9ed INFO APIGatewayProxyEvent: {

"version": "2.0",

"routeKey": "GET /i/{dimensions}/{image+}",

"rawPath": "/i/3840/protected/us-east-1:07c0bd29-b67b-cfe3-8f88-af9e1f29d911/8106150e-206b-467d-9a7c-706ee6e4ec3d/nicks-mto-horween-spokane-honey-1759363548-nesting.jpg",

"rawQueryString": "",

"headers": {

"accept-encoding": "br,gzip",

"content-length": "0",

"from": "bingbot(at)[microsoft.com](http://microsoft.com/)",

"host": "[7qbim5e281.execute-api.us-east-1.amazonaws.com](http://7qbim5e281.execute-api.us-east-1.amazonaws.com/)",

"user-agent": "Amazon CloudFront",

"via": "2.0 [a5c2668ceac67d09d90946a7f788efc8.cloudfront.net](http://a5c2668ceac67d09d90946a7f788efc8.cloudfront.net/) (CloudFront)",

"x-amz-cf-id": "XDwFPRJSVxHoxWzXw597V0POH_rQA-kS9Es3OW-EEsDcHc4NIa8byg==",

"x-amzn-trace-id": "Root=1-69020772-3bb3cf822a51cedb4d5328a2",

"x-forwarded-for": "40.77.167.14, 64.252.70.93",

"x-forwarded-port": "443",

"x-forwarded-proto": "https"

},

"requestContext": {

"accountId": "033298393526",

"apiId": "7qbim5e281",

"domainName": "[7qbim5e281.execute-api.us-east-1.amazonaws.com](http://7qbim5e281.execute-api.us-east-1.amazonaws.com/)",

"domainPrefix": "7qbim5e281",

"http": {

  "method": "GET",

  "path": "/i/3840/protected/us-east-1:07c0bd29-b67b-cfe3-8f88-af9e1f29d911/8106150e-206b-467d-9a7c-706ee6e4ec3d/nicks-mto-horween-spokane-honey-1759363548-nesting.jpg",

  "protocol": "HTTP/1.1",

  "sourceIp": "40.77.167.14",

  "userAgent": "Amazon CloudFront"

},

"requestId": "TNYZ6iDcIAMEYfg=",

"routeKey": "GET /i/{dimensions}/{image+}",

"stage": "$default",

"time": "29/Oct/2025:12:24:18 +0000",

"timeEpoch": 1761740658208

},

"pathParameters": {

"dimensions": "3840",

"image": "protected/us-east-1:07c0bd29-b67b-cfe3-8f88-af9e1f29d911/8106150e-206b-467d-9a7c-706ee6e4ec3d/nicks-mto-horween-spokane-honey-1759363548-nesting.jpg"

},

"isBase64Encoded": false

}

e56f2ba8-155b-4fef-9186-3bd67b8dd9ed INFO Reading image

e56f2ba8-155b-4fef-9186-3bd67b8dd9ed INFO Caching image protected/us-east-1:07c0bd29-b67b-cfe3-8f88-af9e1f29d911/8106150e-206b-467d-9a7c-706ee6e4ec3d/nicks-mto-horween-spokane-honey-1759363548-nesting.jpg at 3840xundefined

[ERROR] [1761740662402] LAMBDA_RUNTIME Failed to post handler success response. Http response code: 413. {"errorMessage":"Exceeded maximum allowed payload size (6291556 bytes).","errorType":"RequestEntityTooLarge"}

END RequestId: e56f2ba8-155b-4fef-9186-3bd67b8dd9ed

REPORT RequestId: e56f2ba8-155b-4fef-9186-3bd67b8dd9ed Duration: 4163.43 ms Billed Duration: 4164 ms Memory Size: 1024 MB Max Memory Used: 307 MB

XRAY TraceId: 1-69020772-2be1ba502fb99b117414e28a SegmentId: ef75833548a329a7 Sampled: true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions