AWS DDB Migration is a DynamoDB migration manager (version 1.0.4) that enables management of schema and data migrations for DynamoDB tables via CLI and programmatic API. It creates a state table (`__migrations`) to track applied migrations, supports up/down migrations, and generation of migration files. Key differentiators: lightweight, no external migration framework dependencies, works directly with AWS SDK v2's DynamoDB and DocumentClient. Released as stable, with infrequent updates.
npm install ddb-migrationsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to programmatically run pending migrations using the migrate function with AWS credentials from environment variables.
Create the table manually with appropriate capacity before running migrations, or override table name.
Ensure each migration file exports { up: async (awsConfig, ddb, ddbClient) => {...}, down: async (awsConfig, ddb, ddbClient) => {...} }.Use aws-sdk v2 in your project, or consider alternatives that support v3.
Run migrations sequentially from a single instance, or implement external locking.
Use 'db:migrate' for migration operations and 'migration:generate' for generation.
Run 'npm install ddb-migrations --save' in your project directory.
Pass the correct DynamoDB (not DocumentClient) instance to migration functions if using programmatic API.
Ensure the migration table has a primary key named 'id' of type S.