Skip to content

Instantly share code, notes, and snippets.

@kenoir
Created October 4, 2019 11:53
Show Gist options
  • Save kenoir/c94ea102f15fca31466aeed143e0399a to your computer and use it in GitHub Desktop.
Save kenoir/c94ea102f15fca31466aeed143e0399a to your computer and use it in GitHub Desktop.
def batch_get_bnumbers(dynamo_client, bnumbers):
keys = [
{ 'bnumber': { 'S': bnum } }
for bnum in bnumbers
]
response = dynamo_client.batch_get_item(
RequestItems={
'storage-migration-status' : {
'Keys': keys
}
}
)
for row in response['Responses']['storage-migration-status']:
yield deserialize_row(row)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment