Skip to content

kritish-dhaubanjar/dynamodb-dashboard

Repository files navigation

dynamodb-dashboard

DynamoDB Dashboard

A Web GUI Dashboard for local or remote DynamoDB.

npm npm NPM

Docker Pulls Docker Image Size (tag)

dynamodb-dashboard Builder

Installation:

Install application globally:

npm install --global dynamodb-dashboard

Start dynamodb-dashboard instance:

dynamodb-dashboard start
Options
  • -d, --debug : show log output of running application (default: false)
  • -p, --port <port> : port to run app (default: 4567)
  • -h, --host <host> : host to run app (default: 127.0.0.1)

Setting Environment variables

Currently, following environment variables are supported:

  • AWS_REGION
  • AWS_ENDPOINT
  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_SESSION_TOKEN

To configure, set the AWS environment variables in the terminal session before launching dynamodb-dashboard, example in .bashrc file.

AWS Credentials Resolution

The application uses the AWS SDK for JavaScript (v2), which supports multiple ways to load credentials automatically through the default credential provider chain.

Explicitly passed environment variables

  • AWS_ACCESS_KEY_ID
  • AWS_SECRET_ACCESS_KEY
  • AWS_SESSION_TOKEN (optional)

These take highest priority if provided.

Set environment variables and start dynamodb-dashboard instance:

export AWS_REGION=us-west-2
export AWS_ENDPOINT=http://localhost:8000
export AWS_ACCESS_KEY_ID=fakeAccessKeyId
export AWS_SECRET_ACCESS_KEY=fakeSecretAccessKey

dynamodb-dashboard start

Development Setup

  1. Setup Vue.js App
  2. Setup Node Express Server

OR

  1. git clone https://github.com/kritish-dhaubanjar/dynamodb-dashboard.git
  2. cd dynamodb-dashboard
  3. make watch

Docker

Run a container (from Docker Hub)

  1. docker pull kritishdhaubanjar/dynamodb-dashboard:latest
  2. docker run -p 8080:4567 kritishdhaubanjar/dynamodb-dashboard:latest

Environment Variables:

  • AWS_REGION
  • AWS_ENDPOINT
  • AWS_ACCESS_KEY_ID (optional)
  • AWS_SECRET_ACCESS_KEY (optional)
  • AWS_SESSION_TOKEN (optional)

Build Docker image and run a container (from source & Dockerfile)

a. Clone Repository

  1. git clone https://github.com/kritish-dhaubanjar/dynamodb-dashboard.git
  2. cd dynamodb-dashboard

b. Build Docker Image

docker build . -t dynamodb-dashboard:local

Build Arguments:

  • PORT_ARG (default: 4567)
  • HOST_ARG (default: 0.0.0.0)
  • PREFIX_ARG (default: dynamodb, prefix of route URIs)

c. Run Docker Container

docker run -p 8080:4567 dynamodb-dashboard:local

Environment Variables:

  • AWS_REGION
  • AWS_ENDPOINT
  • AWS_ACCESS_KEY_ID (optional)
  • AWS_SECRET_ACCESS_KEY (optional)
  • AWS_SESSION_TOKEN (optional)

NOTE: For dynamodb running in the host machine, use flag --network=host for running dynamodb-dashboard container.

NGINX Config

To configure Nginx to serve dynamodb-dashboard with (EventSource (Server-Sent Events or SSE) event stream), you need to ensure Nginx is correctly set up to handle long-lived HTTP connections and provide appropriate headers. Here's a basic example configuration:

server
{
    listen 80;
    listen [::]:80;

    server_name _;

    proxy_read_timeout 1d;
    proxy_send_timeout 1d;
    proxy_connect_timeout 1d;

    location /
    {
        proxy_pass http://localhost:4567;
    }

    location /dynamodb/api/database/stream/
    {
        proxy_buffering off;
        proxy_cache off;
        chunked_transfer_encoding off;

        add_header Content-Type text/event-stream;
        add_header Cache-Control no-cache;
        add_header Connection keep-alive;

        proxy_pass http://localhost:4567;
    }
}

Preview:

dynamodb-dashboard

image

Demo:

2022-09-24_22-28-32.mp4

Buy Me a Coffee

Contributors ✨

Thanks goes to these wonderful people:


Bimochan Shrestha

πŸ“–

Bipin Manandhar

πŸ“–

Nihal Maskey

πŸ“–

Biplap Bhattarai

πŸ“–

Jim Dabell

πŸ“–

yyyoichi

πŸ“–

Akhil Lawrence

πŸ“–

License

Distributed under the MIT License. See LICENSE for more information.