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 AWS Region, choose one of the following:
- DynamoDB on-demand backup/restore
- DynamoDB import/export with Amazon Simple Storage Service (Amazon S3)
Resolution
DynamoDB on-demand backup/restore
To restore a DynamoDB table to a different AWS Region, complete the following steps:
- Open the DynamoDB console.
- In the navigation pane, choose Backups.
- In the list that's displayed, choose the backup that you'll use to restore the table.
- Choose Restore.
- For Name of restored table, enter the new table name.
- For Secondary indexes, select your desired option.
- For Destination AWS Region, select Cross-Region.
- For Select the destination AWS Region, choose the Region of your choice.
- For Encryption key management, select your desired option.
- Choose Restore.
DynamoDB import/export with Amazon S3
You can export a table from DynamoDB to S3 in one AWS Region, and then import the table from S3 to DynamoDB in another Region.
Export a table from DynamoDB to S3
Prerequisites: Before you export a table from DynamoDB to Amazon S3, make sure to complete the following prerequisites.
- Activate point-in-time-recovery (PITR)
- Set up permissions that allow DynamoDB to put objects in an S3 bucket
To request a table export from DynamoDB to S3, complete the following steps:
- Open the DynamoDB console.
- In the navigation pane on the left side of the console, choose Exports to S3.
- Select the Export to S3 button.
- Choose a source table and a destination S3 bucket. If the destination bucket is owned by your account, you can use the Browse S3 button to find the bucket. Otherwise, enter the URL of the bucket with a format similar to the following:
s3://bucketname/prefix
Note: The prefix part of the example URL is an optional folder to help keep your destination bucket organized.
- Choose Full export. A full export outputs the full table snapshot of your table as it existed at the point in time that you specify.
- Choose Export to begin the export task.
Import a table from S3 to DynamoDB
Prerequisites: Before you import a table from S3 to DynamoDB, make sure to complete the following prerequisites.
- Set up AWS Identity and Access Management (IAM) permissions that allow the IAM user or role to access DynamoDB, S3, and CloudWatch (for logging)
- Set up S3 bucket permissions that allow read access to objects in the bucket
To request a table import from S3 to DynamoDB, complete the following steps:
- Open the DynamoDB console.
- In the navigation pane on the left side of the console, choose Import from S3.
- On the page that appears, select Import from S3.
- Choose Import from S3.
- In Source S3 URL, enter the Amazon S3 source URL.
- If you own the source bucket, choose Browse S3 to search for the bucket. Or, enter the bucket's URL in the following format:
s3://bucketname/prefix
Note: The prefix in the URL is an Amazon S3 key prefix. The key prefix is either the Amazon S3 object name that you want to import or the key prefix shared by all Amazon S3 objects that you want to import.
- Specify whether you are the S3 bucket owner. If the source bucket is owned by a different account, select A different AWS account, and then enter the account ID of the bucket owner.
- Under Import file compression, select GZIP.
- Select the appropriate Import file format. The options are DynamoDB JSON, Amazon Ion, or CSV. The options you see depend on which format you used when you exported the table.
- Choose Next, and then select the options for the new table that will be created to store your data.
- Choose Next again to review your import options, then choose Import to begin the import task. Your new table is now listed under Tables with the status Creating, but the table is not accessible while it has the Creating status.
After you complete the import, the table status changes to Active and the table is accessible.
Related information
Restoring a DynamoDB table from a backup
Point-in-time recovery (PITR) for Amazon DynamoDB