Migrate a table using AWS Backup for cross-account backup and restore
Prerequisites
-
Source and target AWS accounts must belong to the same organization in the AWS Organizations service
-
Valid AWS Identity and Access Management (IAM) permissions to create and use AWS Backup vaults
For more information about setting up cross-account backups, see Creating backup copies across AWS accounts.
Pricing information
AWS charges for the backup (based on the table size), any data copying between AWS Regions (based on the amount of data), for the restore (based on the amount of data), and for any ongoing storage charges. To avoid ongoing charges, you can delete the backup if you don't need it after the restore.
For more information about pricing, see AWS Backup pricing
Step 1: Enable advanced features for DynamoDB and cross-account backup
-
In both the source and target AWS account, access the AWS Management Console and open the AWS Backup console.
-
Choose the Settings option.
-
Under Advanced features for Amazon DynamoDB backups, confirm that Advanced features is enabled. If it isn't, choose Enable.
-
Under Cross-account management, for Cross-account backup, choose Turn On.
Step 2: Create a backup vault in the source account and target account
-
In the source AWS accounts, open the AWS Backup console.
-
Choose Backup vaults.
-
Choose Create Backup vault.
-
Copy and save the Amazon Resource Name (ARN) of the created backup vaults and the target AWS account.
-
You'll need the ARNs of both the source and target backup vaults when copying the DynamoDB table backup between accounts.
Step 3: Create a DynamoDB table backup in the source account
-
On the AWS Backup Dashboard page, choose Create on-demand backup.
-
In the Settings section, select DynamoDB as the Resource type, and then select the table name.
-
In the Backup vault dropdown list, select the backup vault you created in the source account.
-
Select the desired Retention period.
-
Choose Create on-demand backup.
-
Monitor the status of the backup job on the Backup Jobs tab of the AWS Backup Jobs page.
Step 4: Copy the DynamoDB table backup from the source account to the target account
-
After the backup job completes, open the AWS Backup console in the source account and choose Backup vaults.
-
Under Backups, choose the DynamoDB table backup. Choose Actions and then Copy.
-
Enter the AWS Region of the target account.
-
For External vault ARN, enter the ARN of the backup vault you created in the target account.
-
In the target account backup vault, enable access from a source account to allow copying backups.
Step 5: Restore the DynamoDB table backup in the target account
-
In the target AWS account, open the AWS Backup console and choose Backup vaults
-
Under Backups, select the backup you copied from the source account. Choose Actions, then Restore.
-
Enter the name for the new DynamoDB table, the encryption that this new table will have, the key you want the restore to be encrypted with, and any other options.
-
When the restore is completed, the table status will show as Active.