Created
October 4, 2019 11:53
-
-
Save kenoir/c94ea102f15fca31466aeed143e0399a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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