What's the best way to identically copy one table over to a new one in DynamoDB?
(I'm not worried about atomicity).
You can migrate your DynamoDB tables to a different AWS account by doing the following: Export the DynamoDB table data into an Amazon Simple Storage Service (Amazon S3) bucket in the other account. Use an AWS Glue job to import the data.
To export a DynamoDB table, you use the AWS Data Pipeline console to create a new pipeline. The pipeline launches an Amazon EMR cluster to perform the actual export. Amazon EMR reads the data from DynamoDB, and writes the data to an export file in an Amazon S3 bucket.
DynamoDB Global Tables allows deploying a multi-region, multi-master DynamoDB replication solution. It is a fully-managed solution, where users need not write any custom code to make changes to data. DynamoDB automatically updates the data before replicating it across different regions.
Create a backup(backups option) and restore the table with a new table name. That would get all the data into the new table. Note: Takes considerable amount of time depending on the table size
I just used the python script, dynamodb-copy-table, making sure my credentials were in some environment variables (AWS_ACCESS_KEY_ID
and AWS_SECRET_ACCESS_KEY
), and it worked flawlessly. It even created the destination table for me.
python dynamodb-copy-table.py src_table dst_table
The default region is us-west-2
, change it with the AWS_DEFAULT_REGION
env variable.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With