Registry / database / east-dynamodb

east-dynamodb

JSON →
library1.0.1jsnpmunverified

AWS DynamoDB adapter for the east migration tool (version 1.0.1, stable). It relies on AWS SDK v3 and provides a plugin to run database migrations on DynamoDB tables with composite primary keys. Key differentiators: lightweight, no transactions (DynamoDB limitation), supports environment variable configuration, and requires manual installation of peer dependencies (@aws-sdk/client-dynamodb and @aws-sdk/util-dynamodb). Release cadence: infrequent updates. Compared to alternatives like dynamodb-migrate or node-dynamodb-migrate, east-dynamodb integrates tightly with east's migration framework.

npm install east-dynamodb
INSTALL
IMPORT
SIG · EAST-DYNAMODB
E
east-dynamodb
databasejavascriptv1.0.1
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.

default
✓ const adapter = require('east-dynamodb');
✗ import adapter from 'east-dynamodb';
CommonJS module; not ESM. Use require().
adapter
✓ const adapter = require('east-dynamodb');
✗ import { adapter } from 'east-dynamodb';
Default export is the adapter object.
migrate / rollback functions
✓ // Not exported; used internally by east via .eastrc configuration
No need to import manually; east loads the adapter automatically.

Shows installation, .eastrc config, and a sample migration file with migrate/rollback using DynamoDBClient.

// 1. Install dependencies // npm install --save-dev east east-dynamodb @aws-sdk/client-dynamodb @aws-sdk/util-dynamodb // 2. Create .eastrc file // { // "adapter": "east-dynamodb", // "tableName": "MyTable", // "dynamoDB": { // "region": "us-east-1" // } // } // 3. Create a migration file (east create my_migration) // migrations/1_my_migration.js module.exports = { migrate: async function(client) { // client is a DynamoDBClient instance await client.putItem({ TableName: 'MyTable', Item: { PK: { S: 'user' }, SK: { S: '123' }, name: { S: 'Alice' } } }); }, rollback: async function(client) { await client.deleteItem({ TableName: 'MyTable', Key: { PK: { S: 'user' }, SK: { S: '123' } } }); } }; // 4. Run migrations: npx east migrate
Debug
Known issues
gotchaPeer dependencies must be installed separately; npm will not install them automatically.
fix
Run: npm install --save-dev @aws-sdk/client-dynamodb @aws-sdk/util-dynamodb
affects: >=1.0.0
gotchaOnly tables with composite primary key (partition key + sort key) are supported. Tables with simple primary key will break.
fix
Use a table with both PK and SK fields. Contact maintainer for simple key support.
affects: >=1.0.0
gotchaSecondary indexes are not supported. Migration items use only primary key fields.
fix
Do not rely on indexes for migration queries. Ensure your table has no local secondary indexes or that migration items are ignored by them.
affects: >=1.0.0
gotchaDynamoDB does not support transactions; concurrent writes during migration may cause inconsistent state.
fix
Disconnect all services from the table during migrations. Backup your table before migrating.
affects: >=1.0.0
deprecatedAWS SDK v2 is not supported; package uses v3.
fix
Use @aws-sdk/client-dynamodb v3, not aws-sdk v2.
affects: >=1.0.0
Errors
Common errors & fixes
Error: Cannot find module '@aws-sdk/client-dynamodb'
Peer dependency not installed.
fix
Run: npm install --save-dev @aws-sdk/client-dynamodb
ValidationException: The provided key element does not match the schema
Table has simple primary key (only partition key), but adapter expects composite key.
fix
Use a table with both partition key and sort key, or customize partitionKey/sortKey in .eastrc.
Error: Cannot find module 'east'
east is not installed.
fix
Run: npm install --save-dev east
TypeError: east.create is not a function
Using wrong east API or version mismatch.
fix
Consult east documentation for correct CLI usage: npx east create <name>
Upgrade
Version history
1.0.1latest on npm
Audit
Dependencies
@aws-sdk/client-dynamodbrequiredRequired to interact with DynamoDB (peer dependency)
@aws-sdk/util-dynamodbrequiredRequired for marshalling/unmarshalling DynamoDB items (peer dependency)
Agent activity
17 hits · last 30 days
node
16
Resources
east-dynamodb — npm install east-dynamodb · libregistry