Jimp: Jimp callback doesn't finish in AWS lambda

Created on 7 Feb 2018  路  7Comments  路  Source: oliver-moran/jimp

I have been trying to get Jimp to run in a lambda function. When I try to push it to a lambda function, I don't get the Jimp image. I get <Jimp pending... >. My guess is the callback never finished. Why does a callback finish im a local machine for this library and not AWS lambda?

question

Most helpful comment

My motivation is because there are no native deps. That makes lambda deployments easier.

All 7 comments

How long do you let your lambda functions run ? Lambda functions are usually limited to 500ms, and Jimp might take longer than that.

Why use this in AWS Lambda? Would be easier to either use ImageMagick or OpenCV, depending on what image processing you need to do. There's quite a bit more support for those libs and they are much much more mature.

My motivation is because there are no native deps. That makes lambda deployments easier.

@dcworldwide @SomeNerdNamedSteve can i see your code? I suspect you are doing something like

const image = new Jimp(...) //runs async code so . image might be undefined 
console.log(image)

change to

const image = await Jimp.read(...)
console.log(image) // should have resolved image

@SomeNerdNamedSteve Any updates?

@SomeNerdNamedSteve this will be closed in a month if no update is given

Closed due to inactivity.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

molipha picture molipha  路  6Comments

slidenerd picture slidenerd  路  4Comments

laino picture laino  路  5Comments

Favna picture Favna  路  4Comments

dtrofimov picture dtrofimov  路  5Comments