Hi,
ImageMagick is no longer bundled with the Node.js 10.x runtime. There are two options to get ImageMagick working with your Node.js 10.x function:
- Package the dependency and include it in your uploaded ZIP file
or - Create or use a Lambda Layer that includes ImageMagick
Cheers,
Kevin
Hi
I am new to all this Node stuff, what do you mean by "Package the dependency and include it in your uploaded ZIP file"? how can I do that? I am trying to use Node 10.x for image conversions using AWS Lambda. Please help!
Thanks
This may be of assistance
I ended up going through the process myself and it does indeed work.
To save you some time here's a zip file you can use to create a Lambda Layer.
https://connorb-share.s3.eu-west-2.amazonaws.com/image-magick.zip
When you create the layer make sure you add Node.js 10.x as a supported runtime. You can then set your function to use the latest Node.js 10.x and add the layer you created. The image conversion should then work again!
Edited by: connorB09b on Oct 20, 2019 5:20 AM
Hi
Many thanks for this resource. We faced similar issue and used the zip file you provided and it worked. Can you please explain the process in creating the zip. We still have some issues with respect to image color and want to further investigate.
Thanks
@connorB09b Thank you for posting your zip file, Connor!
Unfortunately, after we uploaded it as a new Lambda layer on our aws-lambda-image, it still didn't work for us.
This worked fine with NodeJS 8.10, but since we've been forced to upgrade (to either NodeJS 10.x or 12.x), it's not working even with the zip file.
I am familiar with layers, and I think i followed the instructions correctly. Can you think of anything further i need to do?
The Lambda is running in us-east-1 if that makes any difference.
Thanks!
Relevant content
- asked 4 years ago
- asked a year ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 8 months ago