dynamoose
Dynamoose is a modeling tool for Amazon DynamoDB, providing a Mongoose-inspired API for defining schemas, models, and performing CRUD operations on DynamoDB tab…
Installation
npm install dynamoose
yarn add dynamoose
pnpm add dynamoose
Import
import dynamoose from 'dynamoose';
Quick Example
import dynamoose from 'dynamoose';
const UserSchema = new dynamoose.Schema({
id: String,
name: { type: String, required: true },
email: String,
});
const User = dynamoose.model('User', UserSchema);
const user = await User.create({ id: '1', name: 'Alice', email: '[email protected]' });About dynamoose
Dynamoose is a modeling tool for Amazon DynamoDB, providing a Mongoose-inspired API for defining schemas, models, and performing CRUD operations on DynamoDB tables. The library abstracts the complexity of DynamoDB's low-level API — which requires manual construction of expression attribute names, values, and condition expressions — into a familiar, developer-friendly interface. Dynamoose schemas define attributes with types, defaults, validators, required flags, and DynamoDB-specific options like hash keys, range keys, and indexes. The library supports single-table design patterns, automatic table creation, conditional operations, batch get/write, scan and query operations with filters, and DynamoDB transactions. Models provide methods like Model.get(), Model.query(), Model.scan(), Model.create(), and Model.update() with promise-based APIs. Dynamoose handles the serialization and deserialization of DynamoDB's attribute value format (S, N, M, L, etc.) transparently. The library supports local secondary indexes and global secondary indexes, TTL (time-to-live) for automatic item expiration, and DynamoDB Streams integration. Dynamoose is the most popular DynamoDB modeling library for Node.js, particularly valued by teams transitioning from MongoDB/Mongoose who want a familiar API.
Quick Facts
| Package | dynamoose |
| Category | Database |
| Weekly Downloads | 100K+ |
| License | Unlicense |
| Install | npm install dynamoose |
Related Packages
Mongoose is the most popular Object Data Modeling (ODM) library for MongoDB and Node.js, providing a…
mongodb is the official MongoDB Node.js driver that provides a direct interface to MongoDB databases…
Prisma is a next-generation Node.js and TypeScript ORM that provides a declarative data modeling lan…
redis (node-redis) is the official Redis client for Node.js, providing a full-featured interface to …
Browse npm Packages by Category
Explore our reference of 200 popular npm packages with install commands, examples, and quick-start guides.