Registry / database / dynamodb-mongodb-migrate

dynamodb-mongodb-migrate

JSON →
library0.9.4jsnpmunverified

Data migration module for transferring DynamoDB tables to MongoDB collections. Current stable version: 0.9.4. Provides simple job-based migration with support for DynamoDB filter expressions, data filtering, and mapping functions. Key differentiators: lightweight, explicit throughput control via `DYNAMODB_READ_THROUGHPUT`, and support for both filter expressions and post-scan filters. Primarily used for one-off migrations, not incremental sync. Note: project is in early development with limited maintenance activity.

databasedevops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Package exports a single constructor function as default. Destructuring will not work.

const MigrationJob = require('dynamodb-mongodb-migrate');

No ESM support; use CommonJS with require().

import MigrationJob from 'dynamodb-mongodb-migrate';

Shows basic initialization and run of a migration job from DynamoDB table to MongoDB collection.

const MigrationJob = require('dynamodb-mongodb-migrate'); const sourceOptions = { region: 'us-east-1', accessKeyId: process.env.AWS_ACCESS_KEY_ID ?? '', secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY ?? '' }; const targetOptions = { host: 'mongodb://localhost:27017', user: '', password: '' }; const job = new MigrationJob('my-table', 'my-collection', 'my-db', sourceOptions, targetOptions, 1000, 5); job.run().then(() => console.log('Migration complete')).catch(console.error);
Debug
Known footguns
breakingConstructor signature changed: parameters must be passed in exact order (table, collection, db, sourceOpts, targetOpts, scanLimit, readThroughput). Omitting arguments will cause runtime errors.
deprecatedThe `setFilterFunction` and `setMapperFunction` methods are deprecated in favor of filter expressions.
gotchaThe `DYNAMODB_READ_THROUGHPUT` parameter can cause throttling if set too high; default is 5 units.
gotchaTarget MongoDB collection must exist beforehand; migration does not create it automatically.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
8 hits · last 30 days
gptbot
3
mj12bot
1
ahrefsbot
1
Resources