serverless-step-functions-offline icon indicating copy to clipboard operation
serverless-step-functions-offline copied to clipboard

Promise support (Node.js8)

Open valonhaliti opened this issue 5 years ago • 3 comments

When passing data with callback it's working fine (the Next state is being triggered).

export const handler = (event, context, cb) => {
    cb(null, {
       data: result
     });
};

But when I'm using async functions (promises) instead:

export const handler = async event => {
    return {
       data: result
     };
};

It's not working, the process is shutting down. The Next state it's not being triggered at all.

valonhaliti avatar May 13 '19 13:05 valonhaliti

I think this PR will solve this issue: https://github.com/vkkis93/serverless-step-functions-offline/pull/28 @vkkis93 can you please look into this whenever you have time?

valonhaliti avatar May 15 '19 21:05 valonhaliti

@vkkis93 is there news about async lambda issue?

Arsen0809 avatar Aug 15 '19 11:08 Arsen0809

Hey guys. I'm also getting this bug. This project probably isn't maintained anymore.

karlpatrickespiritu avatar Jul 24 '20 03:07 karlpatrickespiritu