Registry / database / dynongo

dynongo

JSON →
library0.19.0jsnpmunverified

Version 0.19.0 (last release unknown, no recent updates). Provides a MongoDB-like query syntax for Amazon DynamoDB, including chaining methods like .find(), .where(), .select(), and .exec(). Supports table prefixing, connection to DynamoDB Local, retry mechanisms via p-retry, and TypeScript types. Differentiated by offering a familiar MongoDB-style API for DynamoDB, but has low activity and depends on the older aws-sdk v2.

npm install dynongo
INSTALL
IMPORT
SIG · DYNONGO
D
dynongo
databasejavascriptv0.19.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.

default export
✓ import dynongo from 'dynongo';
✗ const dynongo = require('dynongo');
The package is primarily used via CommonJS require, but TypeScript can use default import.
connect
✓ dynongo.connect({ region: 'us-east-1' });
Connect is a method on the default export.
table
✓ const table = dynongo.table('MyTable');
✗ const table = dynongo.Table('MyTable');
Table method is lowercase 'table'. TypeScript types are available.
rawTable
✓ const rawTable = dynongo.rawTable('ExactTableName');
✗ const rawTable = dynongo.table('ExactTableName', true);
rawTable is a separate method, not an option to table.

Connects to DynamoDB (using environment variables for credentials), gets a prefixed table, and queries with MongoDB-like syntax.

import dynongo from 'dynongo'; dynongo.connect({ region: process.env.REGION ?? 'us-east-1', // credentials from env or IAM role }); const Employee = dynongo.table('Employee'); Employee .find({}) .where({ Salary: { $gt: 3000 } }) .select('FirstName Name') .exec() .then(employees => { console.log(employees); }) .catch(err => { console.error(err); });
Debug
Known issues
deprecatedPackage uses aws-sdk v2, which is in maintenance mode. AWS recommends upgrading to v3 (@aws-sdk/client-dynamodb).
fix
Consider migrating to aws-sdk v3 or use a more actively maintained DynamoDB abstraction.
affects: >=0.0.0
gotchaTable names are automatically prefixed with the 'prefix' option from connect(). Use rawTable() to bypass.
fix
For non-prefixed tables, use dynongo.rawTable('ExactTableName') instead of dynongo.table().
affects: >=0.0.0
gotchaThe .exec() method must be called at the end of the query chain to execute. Forgetting it results in no operation.
fix
Always call .exec() at the end of your query chain, or use await on the promise.
affects: >=0.0.0
breakingVersion 0.x does not follow semver strictly; minor versions may contain breaking changes.
fix
Pin to a specific version and test upgrades carefully.
affects: >=0.0.0 <1.0.0
Errors
Common errors & fixes
Cannot find module 'dynongo'
Dynongo is not installed or not in node_modules.
fix
Run: npm install dynongo
CredentialsError: Missing credentials in config
No AWS credentials provided via env vars, IAM role, or config.
fix
Set AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY (and optionally AWS_SESSION_TOKEN) environment variables, or call dynongo.connect({ accessKeyId: '...', secretAccessKey: '...' }).
TypeError: dynongo.connect is not a function
Importing incorrectly; likely using named import instead of default.
fix
Use: import dynongo from 'dynongo'; (default import) or const dynongo = require('dynongo');
ValidationException: The provided key element does not match the schema
Query key conditions do not match the table's primary key schema.
fix
Ensure your .where() conditions use the correct key attributes (hash key, range key) and operators.
Upgrade
Version history
0.19.0latest on npm
Audit
Dependencies
aws-sdkrequiredPeer dependency: required for all DynamoDB operations.
Agent activity
15 hits · last 30 days
node
14
Resources
dynongo — npm install dynongo · libregistry