Skip to content

Instantly share code, notes, and snippets.

@vladholubiev
Created November 11, 2022 10:46
Show Gist options
  • Save vladholubiev/4328b3114eb2bfaa14de846405e03fb7 to your computer and use it in GitHub Desktop.
Save vladholubiev/4328b3114eb2bfaa14de846405e03fb7 to your computer and use it in GitHub Desktop.
const {parallelScan} = require('@shelf/dynamodb-parallel-scan');
(async () => {
const items = await parallelScan(
{
TableName: 'files',
FilterExpression: 'attribute_exists(#fileSize)',
ExpressionAttributeNames: {
'#fileSize': 'fileSize',
},
ProjectionExpression: 'fileSize',
},
{concurrency: 1000}
);
console.log(items);
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment