Last active
May 6, 2019 14:55
-
-
Save kennovation1/97c98032c60761ce2261017bf9692af3 to your computer and use it in GitHub Desktop.
Signature example for function to convert an existing table to a global DynamoDB table
This file contains 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
''' | |
Utility function that wraps other utilities to run a pipeline that dumps data from existing table to an S3 file, | |
clears the table, configures the global table group, reloads the table from the backup | |
''' | |
success = enableGlobalTables( | |
'sourceTable': 'mySourceTable', | |
'sourceRegion': 'us-east-1', | |
'partitionKey': 'myPartKey', | |
'sortKey': None, | |
'backupBucket': 'myScratchBucket', | |
'backupKey': 'ddbDumps/mySourceTable.pickle', # A timestamp suffix will be added | |
'regionList': ['us-east-1', 'us-west-2'] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment