How can I install GraphicsMagick or ImageMagick on AWS Lambda?

前端 未结 7 1515
灰色年华
灰色年华 2020-11-29 20:18

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\'

7条回答
  •  执笔经年
    2020-11-29 21:11

    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.

提交回复
热议问题