I am using the gm
package for Node.js along with the default ImageMagick installation that is available on AWS Lambda.
const gm = require(\'gm\'
If you install Docker on your local device and add this command into your package.json.
"dockerbuild": "rm -rf node_modules/gm && docker run -v \"$PWD\":/var/task lambci/lambda:build-nodejs8.10 npm install"
Run npm run dockerbuild
before you deploy your app.
You should change the node version based on the version of your lambda environment.