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

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
prathyusharani
Posts: 1
Joined: 2018-10-05T09:24:10-07:00
Authentication code: 1152

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

Post by prathyusharani » 2018-10-05T09:34:16-07:00

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!!

gojko
Posts: 2
Joined: 2019-07-05T05:25:46-07:00
Authentication code: 1152

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

Post by gojko » 2019-07-05T05:33:42-07:00

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

Post Reply