I have lambda functions folder structure as
---root -functions ---node_nodules ---lib ---function1.js ---function2.js -function1.lambda -function2.lambda There are lot of functions and lot of lambda handler.
The file size of the functions folder is about 140mb due to node modules alone 138 MB. Though I was able to deploy the lambda function with
lambda deploy function1.lambda. But suddenly following error started to appear.
Error generating zip file /usr/local/lib/node_modules/aws-lambda/lib/main.js:82 throw err; ^ RangeError [ERR_CHILD_PROCESS_STDIO_MAXBUFFER]: stdout maxBuffer length exceeded at Socket.onChildStdout (child_process.js:354:14) at Socket.emit (events.js:198:13) at Socket.EventEmitter.emit (domain.js:448:20) at addChunk (_stream_readable.js:288:12) at readableAddChunk (_stream_readable.js:265:13) at Socket.Readable.push (_stream_readable.js:224:10) at Pipe.onStreamRead (internal/stream_base_commons.js:94:17) I tried searching for the fix, but i could not find any appropriate one. Can anyone help here ? Thanks in advance.