Skip to content

Large dynamoDB tabel migration from a region to another

0

Hi, I'm doing a migration of several applications and I have a very large dynamoDb table (25GB) that I need to quickly transfer the table from a region A to another region B. I have tried to use AWS Backup/Restore but it is slow, needing a long downtime. Can I use GlobalTables to speedup process instead? The pipeline should be the following:

  1. Update table in region A, activating streams and replica in region B (this could be done many days before doing migration, without dowtime)
  2. On day X move all applications stuff to region B
  3. Post migration, after at least 24 hours, from region B remove replica in region A (the source table)

What I do not understand is if the 2nd step will only remove the source table in region A (leaving table in region B standalone, with all datas) or if it will delete all data also in region B.

Please, could you explain me what it should happens? Thanks

asked a year ago717 views

1 Answer
0
Accepted Answer

Amazon DynamoDB global tables can indeed be used to migrate your large 25GB table from Region A to Region B with minimal downtime. The approach you've outlined is valid and would work effectively.

When you set up global tables, you're creating a multi-Region, multi-active database where data is automatically replicated across your chosen AWS Regions. This replication happens continuously in the background, which means you can set it up well in advance of your migration day without any downtime.

Here's how your proposed process would work:

  1. First, you would convert your existing table in Region A to a global table by adding a replica in Region B. DynamoDB will automatically begin replicating all existing data and ongoing changes to Region B. This initial synchronization happens in the background without affecting your application's performance.

  2. On migration day (day X), you would redirect your applications to use the Region B replica. Since the data is already synchronized, there's no need for a lengthy downtime window.

  3. After your applications are successfully running with Region B, you can remove the Region A replica when you no longer need it.

When you remove a replica from a global table (step 3), DynamoDB only removes that specific replica table from the Region you specify (Region A in your case). The data in your remaining replica (Region B) will be preserved and will continue to function as a standalone DynamoDB table. Removing a replica does not delete data from other replicas.

This approach offers significant advantages over backup/restore, as it provides continuous replication with minimal downtime during the actual migration. Global tables provide 99.999% availability and are specifically designed to support this kind of multi-Region operation.
Sources
Replicate DynamoDB Across Regions - Amazon DynamoDB Global Tables - AWS
Global tables - multi-active, multi-Region replication - Amazon DynamoDB
How DynamoDB global tables work - Amazon DynamoDB
Using Amazon DynamoDB global tables - AWS Prescriptive Guidance

answered a year ago

AWS
EXPERT

reviewed a year ago

  • I confrim. It works. Tried with a single-table:

    1. I updated existing table in region A activating DynamoDBStreams and replication on region B
    2. After some minutes I saw data in the replica table in region B
    3. After 24 hours I was able to delete replica in region A (source-table)
    4. Table in region B is now standalone and data are preserved
    5. (Optional) After replica is deleted, I can switch off dynamo streams on table in region B

    Thanks

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.