Some node libraries have to be compiled with a lambda compliant linux.
For example, I use crypto
and I have to create an EC2 with an Amazon Linux AMI to build the module before I send it to lambda.
Does Serverless handle such a situation ?
I believe send to lambda node modules compiled on my dev machine is really not a good practice.
enesdo
November 7, 2016, 10:00am
2
Not really answering your question, but I simply changed to pure javascript bcryp library. Using native libs is pain in the ass.
Anthony
November 7, 2016, 11:53am
3
Thanks for your answer.
if you’re talking about bcrypt.js
I have tested it and it is very very slow.
Anyway, the issue will exist with other libraries
rowanu
November 7, 2016, 7:12pm
4
No, Serverless does not compile native libs for you - it’s polyglot by default, so supporting all the various runtimes’ compilations is non-trivial.
AWS just released an official AWS Linux container to help address use-cases like yours; With it you can compile native libraries consistently without using a development machine.
1 Like
ho great news I did not know, thank you