I am just trying to invoke one lambda function from another lambda function, and i am sending a payload into that lambda function. If I paas a payload of size upto 1 mb, then i don't get this error, this error arises when the payload size is greater than 1 mb only.
import * as AWS from "aws-sdk";
const lambda = new AWS.Lambda({
region: "us-east-1",
endpoint: "http://localhost:3002",
});
const params = {
FunctionName: "myFunction", // the lambda function we are going to invoke
InvocationType: "RequestResponse",
LogType: "Tail",
Payload: JSON.stringify(data),
};
const lambdaResult = await lambda.invoke(params).promise();