Page 1 of 1

How to run Image Magick native cli in AWS lambda to resize images

Posted: 2018-10-05T09:34:16-07:00
by prathyusharani
Hi,
I have tried image magick native cli to resize the images on my mac. It worked fine. I would like to get this done using AWS lamda and S3.
I can trigger lambda function when image is uploaded to S3. Now I wanted to write node.js program to re-size the images using Image Magick cli.
I tried it with gm module, it worked. but I wanted to use only native Image Magick cli to do resize.
Does AWS lambda come with prebuilt native Image Magick cli ? If not how can I install the binaries in lamda?

Any help with few example snippets is useful.

Thanks!!

Re: How to run Image Magick native cli in AWS lambda to resize images

Posted: 2019-07-05T05:33:42-07:00
by gojko
Lambda up to node8 came with a prebuild imagemagick binary. Since node 10 IM is no longer included, but you can add it as a layer. Check out Check out https://github.com/serverlesspub/imagem ... s-lambda-2 for more information - that project also includes a sample nodejs app that invokes mogrify cli to resize images