DEV Community

Discussion on: Cleanup the node_modules for a lighter Lambda Function

Collapse
 
njitmann profile image
njitman • Edited

Lambda runtimes come with more than aws-sdk included, so there may be additional packages you can move to dev dependencies and enjoy even more gains without the need to minify, etc. See the following project that you can run in your AWS account to get a list of the included packages.

github.com/alestic/lambdash

Better instructions here:
alestic.com/2015/06/aws-lambda-she...

For example, in the node.js 10.x runtime, the following packages were included:
assert
async_hooks
awslambda
aws-sdk
base64-js
buffer
child_process
cluster
console
constants
crypto
dgram
dns
domain
dynamodb-doc
events
fs
http
http2
https
ieee754
imagemagick
inspector
isarray
jmespath
lodash
module
net
os
path
perf_hooks
process
punycode
querystring
readline
repl
sax
stream
string_decoder
timers
tls
trace_events
tty
url
util
uuid
v8
vm
xml2js
xmlbuilder
zlib

Collapse
 
solegaonkar profile image
Vikas Solegaonkar

Thanks for sharing