How can I install GraphicsMagick or ImageMagick on AWS Lambda?

前端 未结 7 1512
灰色年华
灰色年华 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条回答
  •  -上瘾入骨i
    2020-11-29 21:12

    For node.js, you can use node-lambda, it simplifies packaging using a docker image :

    node-lambda package -I lambci/lambda:build-nodejs6.10 -A . -x '*.lock *.zip'
    

    The -I argument will launch a docker image and launch npm i in your project so it will compile the binary node_modules against the right architecture.

提交回复
热议问题