Reputation: 2422
We have implemented two public lambda. One lambda (A) generates JSON and sends it to another lambda (B) asynchronously for further processing. Note that both lambdas are public and not inside VPC. When lambda A sends payload to lambda B, it gives below error. Now the question is, is there any limitation of max byte transfer between two lambdas? If yes, what is that max size? Can it be increased?
RequestEntityTooLargeException: 293326 byte payload is too large for the Event invocation type (limit 262144 bytes),
at Object.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/json.js:51:27),
at Request.extractError (/var/runtime/node_modules/aws-sdk/lib/protocol/rest_json.js:55:8),
at Request.callListeners (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:106:20),
at Request.emit (/var/runtime/node_modules/aws-sdk/lib/sequential_executor.js:78:10),
at Request.emit (/var/runtime/node_modules/aws-sdk/lib/request.js:683:14),
at Request.transition (/var/runtime/node_modules/aws-sdk/lib/request.js:22:10),
at AcceptorStateMachine.runTo (/var/runtime/node_modules/aws-sdk/lib/state_machine.js:14:12),
at /var/runtime/node_modules/aws-sdk/lib/state_machine.js:26:10,
at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:38:9),
at Request.<anonymous> (/var/runtime/node_modules/aws-sdk/lib/request.js:685:12)
Upvotes: 1
Views: 2140
Reputation: 678
Lambda request size is limited to 6MB for sync requests or 256KB (your issue) for async requests:
https://docs.aws.amazon.com/lambda/latest/dg/limits.html
Under some cases these limits can be increased. The referenced AWS page has a link to the Support Center which is where you would make such a request.
Upvotes: 1