简体   繁体   中英

AWS SDK v3 for NodeJS doesn't call Lambda nor returns error

I have this Lambda function that calls another Lambda (both in same Lambda application and CloudFormation). Turns out that after lambda.send() is called, the code kind of doesn't proceed method execution. But the code outside scheduleNotification() executes normally. If I check the monitor logs for the notification called inside another function, it shows no calls at all? What am I missing here? lambda调用 方法调用 I've tried calling the function locally, remotely, through AWS console and no changes.

In the provided case, when doing a .map , you're just creating an array of promises with scheduleNotification , but you never await any of them. You would need to await them one by one or you can eg use a Promise.all to then await all of them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM