I want to restore the backup of my Amazon DynamoDB table to a different AWS Region.
Short description
To restore your DynamoDB table to a different Region, complete one of the following actions:
- Restore your DynamoDB table from a backup.
- Use Amazon Simple Storage Service (Amazon S3) to export and import your DynamoDB table.
- Add a replica to your DynamoDB table, and then delete your source table.
Resolution
Restore your DynamoDB table from a backup
You can use a backup to restore your DynamoDB table to a different Region. To do this, follow the instructions on Restore a DynamoDB table from a backup. When you get to the Destination AWS Region section, make sure that you select Cross-Region.
Use Amazon S3 to export and import your DynamoDB table
You can export a table from DynamoDB to Amazon S3 in one Region, and then import the table from Amazon S3 to DynamoDB in another Region.
Export a table from DynamoDB to Amazon S3
Prerequisites: Before you export a table from DynamoDB to Amazon S3, complete the following prerequisites:
- Activate point-in-time-recovery (PITR).
- Set up permissions that allow DynamoDB to put objects in an S3 bucket.
To export a table from DynamoDB to Amazon S3, use the AWS Management Console to request an export. When you use these instructions, make sure that you follow the steps for Full export.
Import a table from Amazon S3 to DynamoDB
Prerequisites: Before you import a table from Amazon S3 to DynamoDB, complete the following prerequisites:
- Set up AWS Identity and Access Management (IAM) permissions that allow the IAM user or role to access DynamoDB, Amazon S3, and Amazon CloudWatch (for logging).
- Set up S3 bucket permissions that allow read access to objects in the bucket.
To import a table from Amazon S3 to DynamoDB, use the AWS Management Console to request an import. When you get to Import file compression, make sure that you select GZIP.
Add a replica to your DynamoDB table and delete your source table
You can add a replica to your DynamoDB table to create a global table. After your tables synchronize, your replica table becomes a standalone table, and you can then delete your source table.
Prerequisite: Before you add a replica and delete your source table, verify that you have the required permissions for global tables.
To add a replica to your DynamoDB table, complete the following steps:
- Open the DynamoDB console.
- In the navigation pane, choose Tables.
- Select your table, and then choose Global tables.
- Choose Create replica.
- Under Replication settings, choose Eventual consistency.
- From the Available replication Regions dropdown list, select the Region that you want your table to be in.
- Choose Create.
To delete your source DynamoDB table, complete the following steps:
- Open the DynamoDB console.
- In the navigation, choose Tables.
- Select your table, and then choose Global tables.
- Under Replicas, select the Replication Region for your source table.
- Choose Delete replica.
Note: You can't delete a table that you used to create a replica until you wait 24 hours.
Related information
Point-in-time backups for DynamoDB
Global tables - multi-active, multi-Region replication
Best practices for global tables