Async function returning pending promise, despite use of await [duplicate]
问题 This question already has answers here : How do I return the response from an asynchronous call? (36 answers) async/await implicitly returns promise? (4 answers) Closed 2 months ago . In the below code snippet I am trying to understand why the function does not return the result of the promise. It first logs Promise { <pending> } , then logs the response variable with the correct data from the AWS API describing the table. Why is it doing this? I've tried wrapping the function in another