🗄️
Database100K+/wkUnlicense

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
npm install dynamoose
yarn
yarn add dynamoose
pnpm
pnpm add dynamoose

Import

ESM
import dynamoose from 'dynamoose';

Quick Example

usage
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

Packagedynamoose
CategoryDatabase
Weekly Downloads100K+
LicenseUnlicense
Installnpm install dynamoose

Related Packages

Browse npm Packages by Category

Explore our reference of 200 popular npm packages with install commands, examples, and quick-start guides.