Skip to content

Add DynamoDB zero-downtime migration tools - #163

Draft
shiladitya-bits wants to merge 1 commit into
awslabs:mainfrom
shiladitya-bits:feat/mrsc-migration-tools
Draft

Add DynamoDB zero-downtime migration tools#163
shiladitya-bits wants to merge 1 commit into
awslabs:mainfrom
shiladitya-bits:feat/mrsc-migration-tools

Conversation

@shiladitya-bits

Copy link
Copy Markdown

General-purpose zero-downtime table migration for DynamoDB using Streams, Export to S3, and conditional writes for conflict resolution.

Package: tools/ddb_migration/

Components:

  • lambda/stream_replay.py: Stream replay with _migration_ts conflict resolution
  • glue/backfill_job.py: AWS Glue job for large tables (100+ GiB)
  • scripts/backfill.py: Standalone backfill for smaller tables
  • scripts/convergence_check.py: Pre-cutover verification
  • transform.py: Shared item transformation (customize for schema changes)
  • deploy.sh: One-command infrastructure setup
  • iam/policies.json: Least-privilege IAM templates (including cross-account)

Use cases:

  • Migration to Global Tables with MRSC
  • Cross-account table migration
  • Key schema restructuring
  • Table consolidation

Tested end-to-end with conflict resolution, tombstones, and MRSC strong consistency verification across 3 regions.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

General-purpose zero-downtime table migration for DynamoDB using
Streams, Export to S3, and conditional writes for conflict resolution.

Package: tools/ddb_migration/

Components:
- lambda/stream_replay.py: Stream replay with _migration_ts conflict resolution
- glue/backfill_job.py: AWS Glue job for large tables (100+ GiB)
- scripts/backfill.py: Standalone backfill for smaller tables
- scripts/convergence_check.py: Pre-cutover verification
- transform.py: Shared item transformation (customize for schema changes)
- deploy.sh: One-command infrastructure setup
- iam/policies.json: Least-privilege IAM templates (including cross-account)

Use cases:
- Migration to Global Tables with MRSC
- Cross-account table migration
- Key schema restructuring
- Table consolidation

Tested end-to-end with conflict resolution, tombstones, and MRSC
strong consistency verification across 3 regions.
@tebanieo

Copy link
Copy Markdown
Contributor

Let me start by thanking you for this contribution!

I'd love you had created an issue first so I could redirect you to the right place. We have a similar project i in the aws-dynamodb-examples repository.

We moved the code to that repo because table migrations, in most of the cases, involve custom code, transformations, or particular requirements from customer to customer. Each migration becomes its own ecosystem with assumptions and tradeoffs that are related to each individual customer.

I will review the PRs (since there are two about this now) and discuss internally with the team to decide if we move this to the aws-dynamodb-examples repo.

Thanks!

@tebanieo
tebanieo self-requested a review May 29, 2026 16:22
@tebanieo tebanieo added the enhancement New feature or request label May 29, 2026
@tebanieo tebanieo self-assigned this May 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants