Skip to content

Instantly share code, notes, and snippets.

@SoftwareDevPro
Created September 5, 2020 01:06
Show Gist options
  • Select an option

  • Save SoftwareDevPro/6fe83c4d98cad52070c137dccb8de1e1 to your computer and use it in GitHub Desktop.

Select an option

Save SoftwareDevPro/6fe83c4d98cad52070c137dccb8de1e1 to your computer and use it in GitHub Desktop.
Returns all items from a given table in DynamoDb
async function scan(table) {
try {
let result = await ddb.scan({ TableName: table }).promise()
console.log(result);
} catch (err) {
console.error(err);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment