CamanJS node module with compiled dependency modules and native libraries.
Based on node-canvas-aws-lambda-example - added some additional libs that were required (at least for me to get it working), nice how to guide for compiling libraries on EC2 instance, and script libs_build
that does libs downloading and compiling for you (simple script which could break if i.e. curl fails downloading...).
Also libraries are sparated in /lib
folder.
Fibers also needed to be recompiled with node-gyp
on EC2 running same OS version as AWS Lambda.
Compiled native libs (required by node-canvas) are placed in /lib
folder.
Before deploying to AWS Lambda you should just replace modules in node_modules folder with the 3 provided here (caman
, canvas
, fiber
).
Copy lib
folder to your project folder.
I suggest using https://github.com/motdotla/node-lambda with post install script for deployment.