node-caman-aws-lambda icon indicating copy to clipboard operation
node-caman-aws-lambda copied to clipboard

Working on the current execution environment?

Open zol opened this issue 9 years ago • 5 comments

I was wondering if you've managed to get canvas working on the current exec environment, amzn-ami-hvm-2016.03.3.x86_64-gp2 (http://docs.aws.amazon.com/lambda/latest/dg/current-supported-versions.html)

zol avatar Sep 04 '17 21:09 zol

yes, it is working in production for me. with node version v4.3, don't know 6.10 though

navihtot avatar Sep 05 '17 15:09 navihtot

Thank you.

zol avatar Sep 05 '17 15:09 zol

@navihtot do you plan to update this repo?

alexandresaiz avatar Jul 15 '19 07:07 alexandresaiz

Hey, unfortunately, no. For my use case, I stopped using caman and canvas for image filtering and opted out for using jimp (https://www.npmjs.com/package/jimp) as in that way I don't need any more precompiled dependencies. With precompiled dependencies, things were getting more and more complicated as my Lambda package grew over permitted size. If it's possible for you, I strongly suggest avoiding dependencies that are not supported directly on lambda, it will make your life easier.

There is also sharp, very promising and performant image processing lib in node.js - https://github.com/lovell/sharp, from what the docs say it should be able to run on AWS Lambda

navihtot avatar Jul 15 '19 07:07 navihtot

@alexandresaiz If you really need this, you can follow how to: https://github.com/navihtot/node-caman-aws-lambda/blob/master/how-to.md that should get you on your way to compile dependencies on your own

navihtot avatar Jul 15 '19 09:07 navihtot