DEEP Database Library (deep-db)
raw JSON →deep-db is the database module of the DEEP Framework, an enterprise-level cloud-native framework for building serverless applications on AWS. Version 1.12.25 is part of the deep-framework monorepo, which has seen active maintenance up to v1.12.46, with updates focused on AWS region support, bug fixes, and Node.js compatibility (v4.3+ to v6.x). It provides abstracted database operations over AWS DynamoDB, offering find, get, and partition management features. Uniquely, it is tightly integrated with the DEEP ecosystem, requiring the deepify CLI tool for deployment and local development. This library is not intended for standalone use outside the DEEP framework and is largely dependent on other DEEP modules and AWS services. Alternatives include direct use of AWS SDK DynamoDB client or other DynamoDB abstraction layers like Dynamoose or document client.
Common errors
error TypeError: Cannot read property 'find' of undefined ↓
error Error: The level of configuration is invalid: 1 ↓
error deepify: command not found ↓
Warnings
deprecated deep-db is part of the DEEP framework which is in maintenance mode. Active development has shifted to other platforms. ↓
gotcha deep-db requires the deepify CLI tool for deployment and local development; it cannot be used standalone. ↓
breaking Node.js v6.x migration in v1.12.31 dropped support for Node.js v4.x. Older versions may not work on new AWS Lambda Node.js runtimes. ↓
gotcha deep-db is only compatible with AWS DynamoDB; no support for other databases. ↓
Install
npm install deep-db yarn add deep-db pnpm add deep-db Imports
- Database wrong
import Database from 'deep-db'correctimport { Database } from 'deep-db' - deep-db wrong
const deepdb = require('deep-db')correctconst { Database } = require('deep-db') - getInstance wrong
import { database } from 'deep-db'correctimport { getInstance } from 'deep-db'
Quickstart
const { Database } = require('deep-db');
const db = new Database({
region: process.env.AWS_REGION ?? 'us-east-1',
accessKeyId: process.env.AWS_ACCESS_KEY_ID ?? '',
secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY ?? ''
});
db.find('Users', { name: 'Alice' })
.then(data => console.log(JSON.stringify(data)))
.catch(err => console.error(err));