dynamodb-admin
TypeScript icon, indicating that this package has built-in type declarations

5.1.3 • Public • Published

dynamodb-admin

npm

GUI for DynamoDB Local, dynalite, localstack etc.

Usage

Use as globally installed app

npm install -g dynamodb-admin

dynamodb-admin --dynamo-endpoint=http://localhost:8000

Options:

  • --open / -o - opens server URL in a default browser on start
  • --port PORT / -p PORT - Port to run on (default: 8001)
  • --host HOST / -h HOST - Host to run on (default: localhost)
  • --dynamo-endpoint - DynamoDB endpoint to connect to (default: http://localhost:8000).
  • --skip-default-credentials - Skip setting default credentials and region. By default the accessKeyId/secretAccessKey are set to "key" and "secret" and the region is set to "us-east-1". If you specify this argument then you need to ensure that credentials are provided some other way. See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/setting-credentials-node.html for more details on how default credentials provider works.

Environment variables HOST, PORT and DYNAMO_ENDPOINT can also be used to set the respective options.

If you use a local dynamodb that cares about credentials, you can configure them by using the following environment variables AWS_REGION AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY or specify the --skip-default-credentials argument and rely on the default AWS SDK credentials resolving behavior.

For example with the amazon/dynamodb-local docker image you can launch dynamodb-admin with:

AWS_REGION=eu-west-1 AWS_ACCESS_KEY_ID=local AWS_SECRET_ACCESS_KEY=local dynamodb-admin

If you are accessing your database from another piece of software, the AWS_ACCESS_KEY_ID used by that application must match the AWS_ACCESS_KEY_ID you used with dynamodb-admin if you want both to see the same data.

By default dynamodb-admin sets a default key/secret to values "key" and "secret" and the region to "us-east-1".

Use as a library in your project

This requires AWS SDK v3. If you depend on AWS SDK v2 then you need to use dynamodb-admin v4.

import { DynamoDBClient } from '@aws-sdk/client-dynamodb';
import { createServer } from 'dynamodb-admin';

const dynamoDbClient = new DynamoDBClient();

const app = createServer({ dynamoDbClient });

const host = 'localhost';
const port = 8001;
const server = app.listen(port, host);
server.on('listening', () => {
  const address = server.address();
  console.log(`  listening on http://${address.address}:${address.port}`);
});

Development

Run npm run build and then DYNAMO_ENDPOINT=http://localhost:8000 npm run start to start dynamodb-admin.

You can set up a build watcher in a separate terminal using npm run build:watch which will re-compile the code on change and cause the dynamodb-admin instance to restart.

See also

Screencast

Screencast

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
5.1.315,834latest

Version History

VersionDownloads (Last 7 Days)Published
5.1.315,834
5.1.20
5.1.10
5.1.00
5.0.30
4.6.22,995
4.6.12,574
4.5.04,109
4.4.156
4.4.0380
4.1.01,185
4.0.3489
4.0.20
4.0.12,698
4.0.01,126
3.2.026
3.1.30
3.1.20
3.1.11
3.1.00
3.0.34
3.0.20
3.0.11
3.0.01
2.0.80
2.0.70
2.0.60
2.0.50
2.0.40
2.0.30
2.0.29
2.0.10
2.0.00
1.14.00
1.13.10
1.13.00
1.12.00
1.11.10
1.11.00
1.10.00
1.9.21
1.9.10
1.8.10
1.8.00
1.7.00
1.6.00
1.5.00
1.4.10
1.4.00
1.3.00
1.2.00
1.1.00
1.0.10
1.0.00

Package Sidebar

Install

npm i dynamodb-admin

Weekly Downloads

31,489

Version

5.1.3

License

MIT

Unpacked Size

861 kB

Total Files

46

Last publish

Collaborators

  • aaronshaf
  • matheusvellone
  • lordciccio
  • rchl