I have the following code for a Lambda function:
console.log(\'Loading function\'); var aws = require(\'aws-sdk\'); var ddb = new aws.DynamoDB(); function getUs
Now since node.js has introduced async/await, this can make it wait until the query call returns before the main function terminates:
let result = await ddb.getItem(params).promise(); return result;