nordcloud / lambda-wrapper

Wrapper for running lambda modules locally during development
MIT License
30 stars 17 forks source link

Async handler support for nodejs8.10 #20

Closed Enase closed 6 years ago

Enase commented 6 years ago

Unfortunately wrapper doesn't support this, see:

If you want to use the async feature provided by the v8.10 runtime, consider the following code sample:

exports.myHandler = async function(event, context) {
   console.log("value1 = " + event.key1);
   console.log("value2 = " + event.key2);  
   return "some success message”;
   // or 
   // throw new Error(“some error type”); 
}  

https://docs.aws.amazon.com/lambda/latest/dg/nodejs-prog-model-handler.html

Enase commented 6 years ago

fixed here https://github.com/nordcloud/lambda-wrapper/pull/23