# dynalite

> An implementation of Amazon's DynamoDB built on LevelDB

Latest version **4.0.0** (published 2025-09-18) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install dynalite
pnpm add dynalite
yarn add dynalite
bun add dynalite
```

Provides the command `dynalite`.

## Health

**Score 25/100 (F)** — status: maintenance-mode.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: stale; low maintenance score.

## Facts

| | |
|---|---|
| Version | 4.0.0 |
| Published | 2025-09-18 |
| First published | 2013-06-17 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=20 |
| Dependencies | 9 |
| Unpacked size | 376.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1076 |
| Author | Michael Hart |
| Maintainers | hichaelmart, brianleroux, ryanblock, architectci |
| Keywords | aws, amazon, cloud, dynamo, dynamodb, fake, leveldb, mock, serverless, test |

## Links

- npm: https://www.npmjs.com/package/dynalite
- Repository: https://github.com/architect/dynalite
- Issues: https://github.com/architect/dynalite/issues
- npm.io page: https://npm.io/package/dynalite

## Dependencies (9)

- [lazy](https://npm.io/package/lazy.md) ^1.0.11
- [lock](https://npm.io/package/lock.md) ^1.1.0
- [once](https://npm.io/package/once.md) ^1.4.0
- [async](https://npm.io/package/async.md) ^3.2.4
- [level](https://npm.io/package/level.md) ^10.0.0
- [big.js](https://npm.io/package/big.js.md) ^6.2.1
- [minimist](https://npm.io/package/minimist.md) ^1.2.8
- [buffer-crc32](https://npm.io/package/buffer-crc32.md) ^0.2.13
- [memory-level](https://npm.io/package/memory-level.md) ^3.0.0

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [vest](https://npm.io/package/vest.md) — 50.1K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads

## Recent versions

- 4.0.0 (latest) — 2025-09-18
- 3.2.3-RC.0 (RC) — 2025-09-17
- 3.2.2 — 2022-02-08
- 3.2.1 — 2020-09-09
- 3.2.0 — 2020-05-25
- 3.1.6 — 2020-04-05
- 3.1.5 — 2020-01-09
- 3.1.4 — 2020-01-09
- 3.1.3 — 2020-01-08
- 3.1.2 — 2019-12-05
- 3.1.1 — 2019-12-03
- 3.1.0 — 2019-11-27
- 3.0.0 — 2019-09-23
- 2.3.2 — 2019-07-11
- 2.3.1 — 2019-05-06
- … 108 more at https://npm.io/package/dynalite/versions

## README

# dynalite

[![GitHub CI status](https://github.com/architect/dynalite/workflows/Node%20CI/badge.svg)](https://github.com/architect/dynalite/actions?query=workflow%3A%22Node+CI%22)

An implementation of Amazon's DynamoDB built on LevelDB
(well, [@rvagg](https://github.com/rvagg)'s awesome [LevelUP](https://github.com/Level/levelup) to be precise)
for fast in-memory or persistent usage.

This project aims to match the live DynamoDB instances as closely as possible
(and is tested against them in various regions), including all limits and error messages.

## What about Amazon's DynamoDB Local?

This project was created before DynamoDB Local existed, and when it did, it differed a lot from the live instances
in ways that caused my company issues. Since then it's had a lot more development and resources thrown at it,
and is probably more up-to-date than dynalite is. I'd recommend using it over dynalite if you don't mind the
overhead of starting the JVM (or docker) each time. If you need a fast in-memory option that you can start up in
milliseconds, then dynalite might be more suitable for you.

## Example

```sh
$ dynalite --help

Usage: dynalite [--port <port>] [--path <path>] [options]

A DynamoDB http server, optionally backed by LevelDB

Options:
--help, -h            Display this help message and exit
--host                Listen on a specific host address (default: all available)
--port <port>         The port to listen on (default: 4567)
--path <path>         The path to use for the LevelDB store (in-memory by default)
--ssl                 Enable SSL for the web server (default: false)
--createTableMs <ms>  Amount of time tables stay in CREATING state (default: 500)
--deleteTableMs <ms>  Amount of time tables stay in DELETING state (default: 500)
--updateTableMs <ms>  Amount of time tables stay in UPDATING state (default: 500)
--maxItemSizeKb <kb>  Maximum item size (default: 400)
--verbose, -v         Enable verbose logging
--debug, -d           Enable debug logging

Report bugs at github.com/architect/dynalite/issues
```

Or programmatically:

```js
// Returns a standard Node.js HTTP server
var dynalite = require('dynalite')
var dynaliteServer = dynalite({ path: './mydb', createTableMs: 50 })

// Listen on port 4567
dynaliteServer.listen(4567, function(err) {
  if (err) throw err
  console.log('Dynalite started on port 4567')
})
```

Once running, here's how you use the [AWS SDK](https://github.com/aws/aws-sdk-js) to connect
(after [configuring the SDK](https://docs.aws.amazon.com/sdk-for-javascript/v2/developer-guide/configuring-the-jssdk.html)):

```js
var AWS = require('aws-sdk')

var dynamo = new AWS.DynamoDB({ endpoint: 'http://localhost:4567' })

dynamo.listTables(console.log.bind(console))
```

## Installation

With [npm](https://www.npmjs.com/), to install the CLI:

```sh
npm install -g dynalite
```

Or to install for development/testing in your project:

```sh
npm install -D dynalite
```

## TODO

- Implement [Transactions](https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/transaction-apis.html)
- Implement DynamoDB Streams
- Implement `ReturnItemCollectionMetrics` on all remaining endpoints
- Implement size info for tables and indexes
- Add ProvisionedThroughput checking
- See [open issues on GitHub](https://github.com/architect/dynalite/issues) for any further TODOs

---
_Source: https://npm.io/package/dynalite · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
