504344 (5) [Avatar] Offline
#1
Hello,

followed instruction and created function.
Upload of image works fine. Not thumb is generated and I do not find anyting in log.

Policy_CreateThumbnailAndStoreInDB

is added to role.

Please help how to debug.

Thanks
148705 (1) [Avatar] Offline
#2
I've got this working, the trick was using the same version of node locally matching the version in Lambda, which is node 6.10.

I used a node version manager to install the node 6.10 version:
https://github.com/creationix/nvm

Then, I did a (within the createThumbnailAndStoreInDB-js directory):
npm install async --save
npm install aws-sdk --save
npm install gm --save
npm install util --save


I removed the package.json file, zipped up:

index.js and the node_modules directory

And, it started working!

FearNoFailure (1) [Avatar] Offline
#3
im getting similar issues. i went through the steps to use nvm to downgrade to json 6.10. i cant save my lambda function in the web console, and it says "fix errors before saving", however nothing below is being flagged as an error. my guess is that the zip package isnt taking for some reason. i ran npm install, as well as the separate installs you suggested. in my zip, i have index.js and node_modules (dir).

edit:
went into S3 into the trigger section. invoked the lambda function from there. it had objects deleted instead of objects created selected in there. switched it around and it worked. weird thing is that i swear i selected objects created (all) from the lambda side of things. anyone else run into this? am i crazy? great book so far!