node package manager
It’s your turn. Help us improve JavaScript. Take the 2017 JavaScript Ecosystem Survey »


node-dynamo Build Status

Easily create and recreate dynamodb tables and sample data. This package provides the cli and sdk.


npm install node-dynamo --save
cp node_modules/node-dynamo/default.config.js


Modify default configuration file default.config.js.

node-dynamo requires sufficient AWS DynamoDB permission to modify the DynamoDB tables. It relies on aws-sdk library to get the credential.

See configuring aws sdk in node.js

I personally put my credential in ~/.aws/credentials.

When using seed-cordova, webpack reads the credential from ~/.aws/config.json

CLI Usage

dynamo createtable
dynamo createfake
dynamo create --testId 8888 --company 'pt bangun persada'
dynamo read --testId 8888
dynamo update --testId 8888 --company 'new company LLC'
dynamo delete --testId 8888
dynamo deletetable

API Usage

const defaultDb = require('node-dynamo')('./default.config.js');
defaultDb.createTable(function(err, data) {
    console.log('table', data.TableDescription.TableName, 'created');
defaultDb.deleteTable(function(err, data){
defaultDb.createFake(function(err, data) {
defaultDb.create(record, function(err, data) {
function callback(err, data) {
    if (err) {
        console.log('Error:', err);
    } else {
        console.log('Result:', data);
}, callback);
defaultDb.update(record, callback);
defaultDb.delete(record, callback);
defaultDb.list(record, callback);


(C) 2015 Louis Larry
MIT License