• Stars
    star
    1,032
  • Rank 44,644 (Top 0.9 %)
  • Language
    JavaScript
  • License
    Apache License 2.0
  • Created over 11 years ago
  • Updated 12 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An implementation of Amazon's DynamoDB built on LevelDB

dynalite

Build Status

An implementation of Amazon's DynamoDB built on LevelDB (well, @rvagg's awesome 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

$ dynalite --help

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

A DynamoDB http server, optionally backed by LevelDB

Options:
--help                Display this help message and exit
--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)

Report bugs at github.com/mhart/dynalite/issues

Or programmatically:

// 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 to connect (after configuring the SDK):

var AWS = require('aws-sdk')

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

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

Installation

With npm, to install the CLI:

npm install -g dynalite

Or to install for development/testing in your project:

npm install -D dynalite

TODO

  • Implement Transactions
  • Implement DynamoDB Streams
  • Implement ReturnItemCollectionMetrics on all remaining endpoints
  • Implement size info for tables and indexes
  • Add ProvisionedThroughput checking
  • See open issues on GitHub for any further TODOs

More Repositories

1

architect

The simplest, most powerful way to build a functional web app (fwa)
JavaScript
2,485
star
2

arc.codes

The Architect web site! 🌩
JavaScript
312
star
3

aws-lite

A simple, fast, extensible AWS client
JavaScript
231
star
4

functions

AWS Lambda Node runtime helpers for Architect apps
JavaScript
160
star
5

sandbox

Architect dev server: run full Architect projects locally & offline in a sandbox
JavaScript
35
star
6

tap-arc

Node.js spec-like TAP reporter
JavaScript
29
star
7

examples

Architect example applications and cloud function development patterns
21
star
8

data

[deprecated] Generate a DynamoDB data access layer from an .arc file. Automatically disambiguates testing (in memory) from deployment staging and production tables
JavaScript
21
star
9

parser

arc.app, .arc, arc.json, arc.yaml, and arc.toml support
JavaScript
20
star
10

plugin-typescript

TypeScript custom runtime + workflow integration for Architect
JavaScript
14
star
11

functions-python

AWS Lambda Python runtime helpers for Architect apps
Python
13
star
12

plugin-remix

Architect plugin for Remix.
JavaScript
11
star
13

sveltekit-adapter

Svelte
10
star
14

arcdown

A small stack of Markdown tools configured using some preferred conventions for creating technical content rendered and served from a cloud function.
JavaScript
10
star
15

aws-lite-performance

JavaScript
10
star
16

plugins

List of Architect plugins by the community + maintainers
9
star
17

vim-plugin

Official Vim plugin for Architect, including syntax highlighting for the Architect file format (app.arc, .arc, config.arc, and prefs.arc)
Vim Script
6
star
18

deploy

Deployment module for shipping @architect projects to the cloud
JavaScript
6
star
19

create

Module to bootstrap Architect projects, and idempotently create new project resources
JavaScript
6
star
20

plugin-lambda-invoker

Interactively invoke Lambdas in Architect Sandbox with arbitrary events
JavaScript
5
star
21

functions-deno

JavaScript
4
star
22

package

Package .arc apps for deployment with Cloudformation
JavaScript
4
star
23

env

Manage an Architect project's environment variables
JavaScript
4
star
24

macro-http-api

[DEPRECATED] HTTP APIs are now the default in Architect 7+!
JavaScript
4
star
25

macro-upload

A macro for creating an S3 bucket for processing direct uploads with a Lambda function
JavaScript
4
star
26

plugin-budget-watch

Monitor app spend and stop lambdas when the limit is reached
JavaScript
4
star
27

logs

manage @architect Function logs
JavaScript
3
star
28

inventory

Architect project resource enumeration utility
JavaScript
3
star
29

plugin-storage-private

Architect serverless framework macro that defines any number of arbitrary private S3 buckets
JavaScript
3
star
30

hydrate

Architect dependency hydrator and shared file manager
JavaScript
3
star
31

lambda-runtimes

Canonical list of AWS Lambda runtime identifiers and corresponding CPU architectures
JavaScript
3
star
32

vscode-extension

Official VS Code extension for Architect, including syntax highlighting for the Architect file format (app.arc, .arc, config.arc, and prefs.arc)
2
star
33

asap

Architect HTTP proxy distribution, extracted from @architect/functions (arc.http.proxy)
JavaScript
2
star
34

utils

Common utilities for Architect modules
JavaScript
2
star
35

sublime-package

Official Sublime Text package for Architect, including syntax highlighting for the Architect file format (app.arc, .arc, config.arc, and prefs.arc)
JavaScript
1
star
36

functions-ruby

AWS Lambda Ruby runtime helpers for Architect apps
Ruby
1
star
37

req-res-fixtures

API Gateway request/response fixtures for testing in various Architect libraries
JavaScript
1
star
38

plugin-storage-public

Architect serverless framework macro that defines any number of arbitrary public S3 buckets
JavaScript
1
star
39

plugin-external-tables

Enable access to external DynamoDB tables from other Architect projects, legacy Architect projects, and non-Architect projects
JavaScript
1
star
40

plugin-rust

Rust runtime + workflow integration for Architect
JavaScript
1
star
41

macro-proxy

[DEPRECATED] Use `@proxy` built into Architect 8+!
JavaScript
1
star
42

plugin-node-prune

Architect plugin that cleans `node_modules` cruft from your cloud functions during deployment
Shell
1
star
43

macro-node-prune

[DEPRECATED] Please use `@architect/plugin-node-prune`
Shell
1
star
44

repl

creates a REPL for testing Architect projects
JavaScript
1
star
45

plugin-go

Go runtime + workflow integration for Architect
JavaScript
1
star
46

action-build

1
star
47

aws-lite.org

JavaScript
1
star
48

plugin-rest-api

Legacy API Gateway REST API plugin for @architect projects
JavaScript
1
star
49

action-deploy

1
star