Help: serverless deploy errors

lambda

#1

I came across following errors as I try to deploy a hello world function. Any comments on this?

Thanks a lot!
Richard
serverless deploy
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command create
Serverless: Load command install
Serverless: Load command package
Serverless: Load command deploy
Serverless: Load command deploy:function
Serverless: Load command deploy:list
Serverless: Load command deploy:list:functions
Serverless: Load command invoke
Serverless: Load command invoke:local
Serverless: Load command info
Serverless: Load command logs
Serverless: Load command metrics
Serverless: Load command print
Serverless: Load command remove
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Load command slstats
Serverless: Load command plugin
Serverless: Load command plugin
Serverless: Load command plugin:install
Serverless: Load command plugin
Serverless: Load command plugin:uninstall
Serverless: Load command plugin
Serverless: Load command plugin:list
Serverless: Load command plugin
Serverless: Load command plugin:search
Serverless: Load command config
Serverless: Load command config:credentials
Serverless: Load command rollback
Serverless: Load command rollback:function
Serverless: Invoke deploy
Serverless: Invoke package
Serverless: Invoke aws:common:validate
Serverless: Invoke aws:common:cleanupTempDir
Serverless: Packaging service…
Serverless: Excluding development dependencies…

Range Error [ E R R_ F S_ F I L E_ T O O_ L A R G E] —

File size (2217996916) is greater than possible Buffer: 2147483647 bytes

 For debugging logs, run again after setting the "SLS_DEBUG=*" environment variable.

Stack Trace --------------------------------------------

RangeError [ERR_FS_FILE_TOO_LARGE]: File size (2217996916) is greater than possible Buffer: 2147483647 bytes
at FSReqWrap.readFileAfterStat [as oncomplete] (fs.js:264:11)
From previous event:
at Package.getFileContent (/usr/local/lib/nodejs/node-v10.15.3-linux-x64/lib/node_modules/serverless/lib/plugins/package/lib/zipService.js:130:15)
at Package.getFileContentAndStat (/usr/local/lib/nodejs/node-v10.15.3-linux-x64/lib/node_modules/serverless/lib/plugins/package/lib/zipService.js:119:12)
at Array.map ()
at WriteStream.output.on (/usr/local/lib/nodejs/node-v10.15.3-linux-x64/lib/node_modules/serverless/lib/plugins/package/lib/zipService.js:91:29)
at WriteStream.emit (events.js:189:13)
at WriteStream.EventEmitter.emit (domain.js:441:20)
at /usr/local/lib/nodejs/node-v10.15.3-linux-x64/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:231:14
at /usr/local/lib/nodejs/node-v10.15.3-linux-x64/lib/node_modules/serverless/node_modules/graceful-fs/graceful-fs.js:258:16
at FSReqWrap.args [as oncomplete] (fs.js:140:20)

Your Environment Information -----------------------------
OS: linux
Node Version: 10.15.3
Serverless Version: 1.38.0


#2

Solved. This was because I didn’t put the relevant files in a subdir, and from there to deploy.