Part of #33
Depends on: Deploy production infrastructure
Context
The current dev DynamoDB tables contain production user data that needs to move to the new prod tables.
| Source Table |
Items |
Target Table |
dev-ftw-projects |
428 |
prd-ftw-projects |
dev-ftw-inference-results |
658 |
prd-ftw-inference-results |
dev-ftw-images |
0 |
prd-ftw-images (skip, empty) |
Steps
- Enable Point-in-Time Recovery (PITR) on source tables if not already enabled (it is currently enabled)
- Take a backup of the source tables before migration:
aws dynamodb create-backup --table-name dev-ftw-projects --backup-name pre-migration-projects
aws dynamodb create-backup --table-name dev-ftw-inference-results --backup-name pre-migration-inference-results
- Migrate data using one of these methods:
- Option A (recommended for this size): Script using
scan + batch-write-item. The tables are small enough (428 + 658 items) that this completes in seconds.
- Option B: DynamoDB Export to S3 + Import. More complex, better for large tables.
- Verify item counts match after migration:
aws dynamodb scan --table-name prd-ftw-projects --select COUNT
aws dynamodb scan --table-name prd-ftw-inference-results --select COUNT
- Spot-check a few items to confirm data integrity
Important
- Do NOT delete data from dev tables yet. That happens in the cleanup task after prod is verified.
- All commands should use
--region us-west-2 and the appropriate AWS profile.
Part of #33
Depends on: Deploy production infrastructure
Context
The current dev DynamoDB tables contain production user data that needs to move to the new prod tables.
dev-ftw-projectsprd-ftw-projectsdev-ftw-inference-resultsprd-ftw-inference-resultsdev-ftw-imagesprd-ftw-images(skip, empty)Steps
scan+batch-write-item. The tables are small enough (428 + 658 items) that this completes in seconds.Important
--region us-west-2and the appropriate AWS profile.