Currently getting the following error with MongoDB:
no saslprep library specified. Passwords will not be sanitized
We are using Webpack so simply installing the module doesn't work (Webpack just ignores it). I found this thread which talks about how to exclude it from Webpack compilations, but then I have to manually load it into every Lambda function which led me to Lambda Layers.
Following the Serverless guide on using Lambda layers allowed me to get my layer published to AWS and included in all of my functions, but for some reason, it doesn't install the modules. If I download the layer using the AWS GUI, I get a folder with just the package.json
and package-lock.json
files.
My file structure is:
my-project
|_ layers
|_ saslprep
|_ package.json
and my serverless.yml
is:
layers:
saslprep:
path: layers/saslprep
compatibleRuntimes:
- nodejs14.x