External dependencies — this is probably asked all...
# help
d
External dependencies — this is probably asked all the time. Is there an example of how to build a lambda layer that contains my node module built for my architecture? My steps so far: I added SSH2 as a dependency. I couldn’t deploy it. We flagged it as external. Everything deployed. Now I’m realizing that the lambda doesn’t actually have the module. 😞
t
try putting it under
bundle.nodeModules
instead
d
🤞 magically gonna do the trick?
I saw bundle.nodeModules but it felt like by default it was already doing that?
If it has native code….
Rolling it out..
t
Basically
bundle.nodeModules
will add the package to
external
but also
npm install
it into the bundle before uploading
d
@thdxr thanks for the always being quick to offer the solution! It worked