DEV Community

Discussion on: Common Node.js mistakes in Lambda

Collapse
 
theburningmonk profile image
Yan Cui

You can use callback instead of async, but probably shouldn't mix the two as it gives off the impression that you can return early before the async function's promise resolves. Which is not the case, the Lambda invocation will finish and return to the caller with a response when the async function's promise resolves at the end.