Registry / database / dm-driver-dynamodb

dm-driver-dynamodb

JSON →
library1.7.0jsnpmunverified

A driver for the Data Migration framework that provides the ability to load and create DynamoDB entries as part of database migration scripts. Currently at version 1.7.0, the package is maintained by theBenForce as part of the data-migration monorepo. It supports AWS DynamoDB configuration via region, table name, and optional credentials, with built-in handling for CloudFormation outputs. It differentiates from other DynamoDB migration tools by being tightly integrated with the data-migration framework, offering a stage-based migration system.

npm install dm-driver-dynamodb
INSTALL
IMPORT
SIG · DM-DRIVER-DYNAMODB
D
dm-driver-dynamodb
databasejavascriptv1.7.0
harness data pending
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.

DynamoDBDriver
const DynamoDBDriver = require('dm-driver-dynamodb')
import { DynamoDBDriver } from 'dm-driver-dynamodb'
This package does not ship ESM exports; use CommonJS require(). It is not a class but a configuration object with driver parameter.
driver
driver: require('dm-driver-dynamodb')
driver: DynamoDBDriver
The driver is passed directly to the stage configuration as a require() call, not a separate variable.
params
params: { region: 'us-east-1', TableName: 'my-table' }
params: { region: 'us-east-1', tableName: 'my-table' }
The TableName parameter is case-sensitive and must be exactly 'TableName'.

Configures a DynamoDB driver stage for data-migration with explicit AWS credentials.

const dm = require('data-migration'); const driver = require('dm-driver-dynamodb'); module.exports = { defaultStage: 'dev', migrationDirectory: './migrations', stages: { dev: { myTable: { driver, params: { region: 'us-east-1', TableName: 'my-dev-table', accessKeyId: process.env.AWS_ACCESS_KEY_ID ?? '', secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY ?? '' } } } } };
Debug
Known issues
gotchaParameter casing: The TableName parameter must be capitalized 'TableName' exactly; lower-case 'tableName' will not work.
fix
Use 'TableName' (capital T, capital N) in the params object.
affects: >=1.0.0
gotchaThe driver does not export a class; it exports a configuration object. Developers may attempt to instantiate it.
fix
Assign the result of require directly to the driver field in stage config; do not use 'new'.
affects: >=1.0.0
gotchaNo ESM support: this package only works with CommonJS require(). Importing via ES modules (import) will fail.
fix
Use require() instead of import.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find module 'dm-driver-dynamodb'
Package not installed or missing from node_modules.
fix
Run 'npm install dm-driver-dynamodb'.
TypeError: Cannot read properties of undefined (reading 'TableName')
Configuration params object missing required 'TableName' property.
fix
Add 'TableName' to the stage params with a valid table name.
ValidationError: The parameter is not a valid table name
DynamoDB table name does not exist in the specified region or credentials are invalid.
fix
Verify the table name and AWS credentials/region are correct.
Upgrade
Version history
1.7.0latest on npm
Audit
Dependencies
data-migrationrequiredCore framework required to use this driver
Agent activity
16 hits · last 30 days
node
12
Resources
dm-driver-dynamodb — npm install dm-driver-dynamodb · libregistry