Last active
September 12, 2022 20:58
-
-
Save memoryonrepeat/c6d0197a57b3b024fa4d to your computer and use it in GitHub Desktop.
Exporting a DynamoDB table to a .json file
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
| #!/bin/bash | |
| # Dependencies: dynamo-archive | |
| # In case there is some big tables, it is advisable to dedicate a process for each big table | |
| # and another process for the rest, since this can work in parallel | |
| # Can use https://github.com/bchew/dynamodump which is faster and easier | |
| key=<AWS access key> | |
| secret=<AWS secret> | |
| region=<AWS region> | |
| declare -a TABLES=(table1 table2 table3) | |
| for t in ${TABLES[@]} | |
| do | |
| dynamo-archive --table=$t --key=$key --secret=$secret --region=$region > $t.json | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment