AWSinAction/lambda

Nothing appearing in resized

Closed this issue · 5 comments

Hi, I've followed all your instructions, it took a few hours over few days since this is the very first Lambda function I'm trying to setup. So had to get everything from python to aws-cli and aws-shell installed, and all the IAM permissions figured out. I finally got to the "CREATE_COMPLETE" step. Uploaded my first image to -original bucket, and nothing showed up in the -resized bucket. Is there something else I might be missing, I re-read the guide a few more times, and I think I did every step. Also is it possible to not have to use a whole bucket for -original and -resized, but to put them as folders inside another bucket?

Have you checked the CloudWatch Logs of your lambda function?

Thanks for the suggestion. Since it's my very first function, that didn't cross my mind yet. Found the error "Stream yields empty buffer", but not sure what that means:

2017-05-12T13:57:57.240Z f8b7eca5-371a-11e7-8809-417438aaa2b1
{
"errorMessage": "Stream yields empty buffer",
"errorType": "Error",
"stackTrace": [
"Socket. (/var/task/node_modules/gm/lib/command.js:57:17)",
"emitNone (events.js:91:20)",
"Socket.emit (events.js:185:7)",
"endReadableNT (_stream_readable.js:974:12)",
"_combinedTickCallback (internal/process/next_tick.js:80:11)",
"process._tickDomainCallback (internal/process/next_tick.js:128:9)"
]
}

Actually after I searched for that error, I think I found the answer here:
https://forums.aws.amazon.com/thread.jspa?messageID=609872

I increased the memory size for the function and the timeout duration, and now it's working.

how big are you images? in mb?

The 1st one I was testing with was about 2.5mb 4419x3535 pixels