AWS Compute Blog

Tag: nodejs

Everything Depends on Context or, The Fine Art of nodejs Coding in AWS Lambda

Tim Wagner, AWS Lambda General Manager Quick, what’s wrong with the Lambda code sketch below? exports.handler = function(event, context) { anyAsyncCall(args, function(err, result) { if (err) console.log(‘problem’); else /* do something with result */; }); context.succeed(); }; If you said the placement of context.succeed, you’re correct – it belongs inside the callback. In general, when […]

Read More