Giter Site home page Giter Site logo

dynamodb-admin's Introduction

dynamodb-admin

npm

GUI for DynamoDB Local, dynalite, localstack etc.

Usage

Use as globally installed app

npm install -g dynamodb-admin

# For Windows:
set DYNAMO_ENDPOINT=http://localhost:8000
dynamodb-admin

# For Mac/Linux:
DYNAMO_ENDPOINT=http://localhost:8000 dynamodb-admin

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)

You can specify host & port to run on by setting environment variables HOST and PORT respectively. This will override value specified on the command line. This is legacy way to specify the HOST & PORT.

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

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.

Use as a library in your project

const AWS = require('aws-sdk');
const {createServer} = require('dynamodb-admin');

const dynamodb = new AWS.DynamoDB();
const dynClient = new AWS.DynamoDB.DocumentClient({service: dynamodb});

const app = createServer(dynamodb, dynClient);

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 DYNAMO_ENDPOINT=http://localhost:8000 npm run dev to start dynamodb-admin in development mode (with auto-reloading on change).

See also

Screencast

Screencast

dynamodb-admin's People

Contributors

aaronshaf avatar adamsullovey avatar adrieankhisbe avatar benhutchins avatar dependabot[bot] avatar dplusic avatar gabrielgollo avatar garrettheel avatar gpsamson avatar hughjdavey avatar jcdesignweb avatar josep11 avatar knicholson32 avatar liesislukas avatar lordciccio avatar matheusvellone avatar maurozaccariotto avatar mickl avatar natebrunette avatar philtrep avatar rchl avatar relbns avatar ryankazokas avatar sagarbaver avatar sashokbg avatar turntayble81 avatar yitzchak-ben-ezra-ecoplant avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dynamodb-admin's Issues

Purge table data button

I'm always cleaning some of my local dynamo tables to keep it simple and small. But I need to either delete the table and create again, or delete all documents one by one.

What if there was a Purge Data button on left of the Delete table button ?
Then this button would open a modal to confirm the action. When confirmed it would delete the table and create it again. I prefer the delete table/create again approach over the delete all documents, because it's faster and less unit consuming.

I can try working on a PR if you agree in this functionality :)

sh: bower: command not found

Hello ... I was updating dynamodb-admin and the post install fails because I dont have bower...
So if its on the post-install does that make bower a dependency not a devDependency ?

> [email protected] postinstall /Users/msaglietto/.nvm/versions/node/v6.9.2/lib/node_modules/dynamodb-admin
> bower install

sh: bower: command not found
npm ERR! file sh
npm ERR! code ELIFECYCLE
npm ERR! errno ENOENT
npm ERR! syscall spawn
npm ERR! [email protected] postinstall: `bower install`
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

Viewing a table content only displays columns for the attributes of the first item

See https://github.com/aaronshaf/dynamodb-admin/blob/master/views/scan.ejs#L149

  • In a table, save an item with 3 attributes
  • Then in that same table, save another item with 4 attributes (one more)
  • Open that table with dynamodb-admin

You will only be able to see the attributes defined on the first item. To be comprehensive, the code in the scan view should parse all the items in the page and make sure to iterate over all the existing attributes.

Multi pages not being shown

In the Scan tab of any table, after looking by a filter, if the resultset spans more than one page, additional pages are not shown. (Or, more precisely, no additional buttons saying Page2, Page3 etc are shown, as it happened in previous versions).

I don't know it this is deliberate, just pointing it out.

Attribute value 0 is not displayed

If I have an attribute value which is integer 0, it won't show anything. It displays a blank value in the column view. When clicking the View button, it shows the correct value. Also, version 2.x shows the value properly.

Problem installing globally by npm, "Error: EACCES: permission denied, open '/Users/zervis/.config/configstore/bower-github.json' You don't have access to this file."

> [email protected] postinstall /usr/local/lib/node_modules/dynamodb-admin
> bower install

/usr/local/lib/node_modules/dynamodb-admin/node_modules/bower/lib/node_modules/configstore/index.js:54
				throw err;
				^

Error: EACCES: permission denied, open '/Users/zervis/.config/configstore/bower-github.json'
You don't have access to this file.

    at Error (native)
    at Object.fs.openSync (fs.js:642:18)
    at Object.fs.readFileSync (fs.js:510:33)
    at Object.get (/usr/local/lib/node_modules/dynamodb-admin/node_modules/bower/lib/node_modules/configstore/index.js:35:26)
    at Object.Configstore (/usr/local/lib/node_modules/dynamodb-admin/node_modules/bower/lib/node_modules/configstore/index.js:28:44)
    at readCachedConfig (/usr/local/lib/node_modules/dynamodb-admin/node_modules/bower/lib/config.js:19:23)
    at defaultConfig (/usr/local/lib/node_modules/dynamodb-admin/node_modules/bower/lib/config.js:11:12)
    at Object.<anonymous> (/usr/local/lib/node_modules/dynamodb-admin/node_modules/bower/lib/index.js:16:32)
    at Module._compile (module.js:570:32)
    at Object.Module._extensions..js (module.js:579:10)
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] postinstall: `bower install`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] postinstall script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /Users/zervis/.npm/_logs/2017-09-12T09_40_21_639Z-debug.log

Previously I installed this npm package without any problem. But recently it is giving me this error. I have tried to install this package in multiple mac, one being a freshly installed OS. But still the same error.
I have searched for this problem. Found this : bower/bower#2262
In this link, people suggested to do this:

sudo chown -R $USER:$GROUP ~/.npm
sudo chown -R $USER:$GROUP ~/.config

But this doesn't solve the problem. Can anyone help how this problem can be fixed?

the `--port` flag doesn't change port

When running the interface from the command line, the --port flag doesn't appear to run the app on another port.

$dynamodb-admin --port 8002
dynamodb-admin
    listening on http:0.0.0.0:8001

I've tried --port=8002 -p 8002 -p=8002.

Search table names

Would be great a input to filter table names as we type something.
A simple CSS class to show/hide results is enough to make it work.

large integer IDs are rounded

When viewing records whose field values are numbers that exceed JavaScript's Number.MAX_SAFE_INTEGER, the values are rounded to fit within a Number.

For example, these user_ids are incorrectly rounded to the nearest hundred:
DynamoDB Admin 2019-09-25 15-36-22

You can see this rounding effect in a simple JavaScript evaluation:

$ node
> 1318796827993409899
1318796827993409800

I believe the correct solution is to make use of aws-sdk-js's wrapNumbers argument, described here:
https://github.com/aws/aws-sdk-js/blob/b232e4aa2827bd75ad09200ded81be6619fff6a3/lib/dynamodb/converter.js#L16-L21

But I'm not sure where to pass in that flag.

Also, we may also have to avoid using Number() to parse number types in the following locations:

req.query[key] = Number(req.query[key])

req.query[key] = Number(req.query[key])

return Number(keyValue)

something like req.query[key] = req.query[key].replace(/\D/g,''); is probably suitable in those cases.

Scan/Filter and Pagination not available in docker

First of all props for the great tool! We've been using it lately for local development but somehow noticed that the docker image is not showing the Filter/Scan section, neither does the Pagination. Actually the view is completely different. This makes me wonder if it's just pointing to an older version of dynamodb-admin, would be glad to take a look but any hint to where the issue comes from would be appreciated.

Using the docker image

version: '2'
services:
  dynamodb:
    image: tray/dynamodb-local
    ports:
      - 7777:7777
    volumes:
      - ./data/dynamodb/:/opt/dynamodb
    restart: always
    command: -port 7777 -dbPath /opt/dynamodb
  db-ui:
    image: aaronshaf/dynamodb-admin
    ports:
      - 8998:8001
    environment:
      - DYNAMO_ENDPOINT=http://dynamodb:7777

image

Installing manually

  1. npm install dynamodb-admin -g
  2. AWS_ACCESS_KEY_ID=supersecret AWS_SECRET_ACCESS_KEY=supersecret DYNAMO_ENDPOINT=http://localhost:7777 dynamodb-admin
    image

Table columns have no max width

I have a couple columns that store long string values. The text does not wrap, and there is no max-width or overflow property on "td" elements, so the columns stretch out of view, taking subsequent columns with them. The only way to see the hidden data is to scroll all the way over:

image

Get with # in key

I have a key with the # character and I can't use the get function.
Scan function works fine.

Error message shows that it trims everything from the first # until the end:
"Cannot GET /tables/TABLE_NAME/items/KEY_UNTIL_HASH"

Error setup config for local

Trying to use dynamodb for local dev. But I got the following error.

{
  "error": {
    "message": "Not Found",
    "code": "UnknownError",
    "statusCode": 404,
    "time": "2017-07-05T16:28:04.788Z",
    "retryable": false,
    "retryDelay": 49.88090401504783
  }
}

I use this conf

export AWS_SECRET_ACCESS_KEY=mysecret
export AWS_ACCESS_KEY_ID=myaccess
export AWS_REGION=myregion

Also with this:
export AWS_SECRET_ACCESS_KEY=local
export AWS_ACCESS_KEY_ID=local
export DYNAMO_ENDPOINT=http://localhost:8000

Many thanks

Dynamo DB seems to be corrupting shared-local-instance.db file

I'm not sure that the problem is 100% here, but from the searching I did on the web + testing I tried locally, it seems that at least some of it is here. So, the problem:

When using dynamodb-admin, PutItem and UpdateItem operations are broken on dynamodb-local in that they create duplicates of the item in question (in the case of PutItem if you're trying to add a value that already exists, in the case of UpdateItem no matter what). This problem happened to me and other people I'm working with and we run different systems on different machines (I'll try to detail a little about this later) when either we try to update an item directly through dynamodb-admin (i.e.: when we add an item, and then open it up, change the json, and save), and when the update was done through code (when we're testing our API locally). Whenever an update is tried, a duplicate of the object is created (with the updated info), and then dynamodb-local breaks (because it now has two items sharing partition and sort keys). Deleting the item (at least through dynamodb-admin) is impossible, as is purging the table (because deleting is impossible), so the only option is to either delete the table or delete the entire shared-local-instance.db and repopulate it. Although we haven't actually tried putting the same item twice, this seems to be a problem that usually is related to the update problem I just described.

At first I assumed this was some problem with the dynamodb-local instance, but I found a thread where people described the same problem and it was said that this problem was usually found when people used a third-party viewer to manage the database (such as dynamodb-admin itself), which would corrupt the .db file causing the hash and range keys to be lost. To verify that this was, indeed, the case, I removed dynamodb-admin from my workflow, doing everything through the command line. After that sequences of API uses that would previously fail (because it would first update an item, then try to access the same item, but due to this very problem the item had become innaccessible and would cause a crash of dynamodb-local) were now working, with updates working correctly. This shows that the answer provided in the thread is correct at least to some extent.

Some more technical detailing:

  • I'm running on Arch Linux, whereas two of my colleagues have had the same problem on macOS
  • I'm running dynamodb-admin version 4.0.1 installed through npm
  • The dynamodb-local docker instance was setup using this guide from AWS

Update version in the Docker Image

I am currrent moving our stack to use docker in the development to make easy to create the dev env with all the tools that we need, but right now the Docker Image for Dynamo Admin are not using the latest version.

What is the current plan to update the docker images?

Scans and Queries fail if certain attribute names are used

Bug Description

Attribute name are not properly escaped via ExpressionAttributeNames, resulting in the following response when performing a query or scan with a complex attribute name such as hwid.metric.fidelity:

Error loading data: Error: [ValidationException] ExpressionAttributeNames contains invalid key: Syntax error; key: "#hwid.metric.fidelity"

This occurs because the full attribute name is being used in ExpressionAttributeNames instead of a placeholder name that is sure to not contain reserved keywords or syntax errors:

ExpressionAttributeNames[`#${key}`] = key

should be

ExpressionAttributeNames[`#key${i}`] = key

where i is incremented for each key.

Proposed Fix

Only minor changes would be required to backend.js (in particular, the for loop starting on line 431):

Current code backend.js:431

for (const key in filters) {
  if (filters[key].type === 'N') {
    filters[key].value = Number(filters[key].value)
  }
  ExpressionAttributeNames[`#${key}`] = key
  ExpressionAttributeValues[`:${key}`] = filters[key].value
  if (indexBeingUsed && indexBeingUsed.KeySchema.find(
    (keySchemaItem) => keySchemaItem.AttributeName === key)
  ) {
    KeyConditionExpression.push(`#${key} ${filters[key].operator} :${key}`)
  } else {
    ExpressionAttributeNames[`#${key}`] = key
    ExpressionAttributeValues[`:${key}`] = filters[key].value
    FilterExpressions.push(`#${key} ${filters[key].operator} :${key}`)
  }
}

Proposed Fix backend.js:431

let i = 0;
for (const key in filters) {
  if (filters[key].type === 'N') {
    filters[key].value = Number(filters[key].value)
  }
  ExpressionAttributeNames[`#key${i}`] = key
  ExpressionAttributeValues[`:key${i}`] = filters[key].value
  if (indexBeingUsed && indexBeingUsed.KeySchema.find(
    (keySchemaItem) => keySchemaItem.AttributeName === key)
  ) {
    KeyConditionExpression.push(`#key${i} ${filters[key].operator} :key${i}`)
  } else {
    ExpressionAttributeNames[`#key${i}`] = key
    ExpressionAttributeValues[`:key${i}`] = filters[key].value
    FilterExpressions.push(`#key${i} ${filters[key].operator} :key${i}`)
  }
  i = i + 1;
}

I would not mind making a pull request for these changes if that is easier.

Update npm version

Github have 1.31.1 version which fix bower installation, but lastest npm version is 1.13.0. Can you publish the latest into npm?

GUI not displaying any table

I have DynamoDB running on localhost:8000.
screen shot 2018-10-04 at 3 05 20 pm
Now, when I run the AWS command aws dynamodb list-tables --endpoint-url http://localhost:8000, the output is:
screen shot 2018-10-04 at 3 06 11 pm

But these 2 tables are not there on the GUI.
I tried setting the same AWS Region i.e us-west-2, but still it is not coming.
screen shot 2018-10-04 at 3 07 14 pm

Import / Export database

Great tool, thanks a lot!

Would it be possible to add the functionality to import / export the database? So it could be shared between a team of developers.

Does not work with docker image

I have a local docker container running dynamodb and the dynamodb-admin cannot list the tables.

It seems like dynamodb-admin is somehow connected to a different instance of the dynamodb since I can list my tables using aws cli:

aws dynamodb list-tables --endpoint-url http://127.0.0.1:8000 --region eu-west-2

{
"TableNames": [
"Job",
"Music",
"MusicCollection"
]
}

AWS_REGION=eu-west-2 DYNAMO_ENDPOINT=http://127.0.0.1:8000 dynamodb-admin

Shows nothing in the browser.

Any ideas ?

Problem accessing non-local dynamo

Is it possible to hook this up to dynamo hosted on AWS instead of locally. I exported my access key and secret key and tried without setting the dynamo endpoint but I kept getting:

{
  "error": {
    "message": "connect ECONNREFUSED 127.0.0.1:8000",
    "code": "NetworkingError",
    "errno": "ECONNREFUSED",
    "syscall": "connect",
    "address": "127.0.0.1",
    "port": 8000,
    "region": "us-east-1",
    "hostname": "localhost",
    "retryable": true,
    "time": "2017-08-16T14:35:53.351Z"
  }
}

so I tried setting the endpoint to https://dynamodb.us-east-1.amazonaws.com but that resulted in the following error.

{
  "error": {
    "message": "400",
    "code": "UnknownError",
    "statusCode": 400,
    "time": "2017-08-16T14:30:53.374Z",
    "retryable": false,
    "retryDelay": 0
  }
}

Any help on getting this working would be most appreciated.

Thanks,
Nathan

Can't start the gui

My DynamoDB is correctly running, I can open the shell on http://localhost:8000/shell/#

npm install dynamodb-admin -g
run fine.

export DYNAMO_ENDPOINT=http://localhost:8000
Give me error, "export" program is unrecognized. But it's still ok because DynamoDB is already by default on my localhost:8000

dynamodb-admin -o
dynamodb-admin
DYNAMO_ENDPOINT is not defined (using default of http://localhost:8000)
listening on http://0.0.0.0:8001
But the webpage that will be open on http://0.0.0.0:8001/ say it's impossible to reach the site. (I tried with other ports too, but it doesn't work).

Can you help me? Sorry for the noob question.

DynamoDB -inMemory not working?

Is there any way to make default amazon/dynamodb-local or cnadiminti/dynamodb-local to work with this?

They have been started with -inMemory and GUI shows no tables. When I give -sharedDb GUI works.

Clear Install Instructions

Would you provide more details on setting the AWS_ACCESS_KEY_ID, etc please? Meaning do I set these as environment variables, parameters in a file, json file, etc. Thanks

Default port message

If one just types npm start(after installing with the current master), without setting any environment variable, the following message appears

DYNAMO_ENDPOINT is not defined (using default of http://localhost:8000)
listening on http://0.0.0.0:54180

This seems inconsistent. The actual, working port is 54180, 8000 is not served.

Displaying all item's content slows down loading considerably

This is a change in relation to previous versions, where only sections of some fields were showing.
I think it is a bad idea. Even for tables a few, but quite large items, the loading slows down to the point of showing a progress indicator for several seconds. I recommend finding a compromise for speed here.

Add --open flag to open browser after launching server

I'd like to be able to launch a dynamodb-admin instance and then open the browser with a single command. Since the server needs to stay running, dynamodb-admin && open http://localhost:8001 doesn't work, since the first process doesn't end, and dynamodb-admin & open http://localhost:8001 (to launch the processes in parallel) is not a good solution because the server isn't up by the time the browser makes the request, loading an empty or error page.

A good solution would be the opener package. I'm happy to prepare a PR with this, but wanted to open an issue and run the idea by the maintainers first.

Thanks!

Cannot Purge when AttributeName contains hyphen

I'm getting this message:

{ ValidationException: Invalid ProjectionExpression: Syntax error; token: "-", near: "dummy-id"
    at Request.extractError (/Users/me/.npm/_npx/87829/lib/node_modules/dynamodb-admin/node_modules/aws-sdk/lib/protocol/json.js:51:27)
    at Request.callListeners (/Users/me/.npm/_npx/87829/lib/node_modules/dynamodb-admin/node_modules/aws-sdk/lib/sequential_executor.js:106:20)
    at Request.emit (/Users/me/.npm/_npx/87829/lib/node_modules/dynamodb-admin/node_modules/aws-sdk/lib/sequential_executor.js:78:10)
    at Request.emit (/Users/me/.npm/_npx/87829/lib/node_modules/dynamodb-admin/node_modules/aws-sdk/lib/request.js:683:14)
    at Request.transition (/Users/me/.npm/_npx/87829/lib/node_modules/dynamodb-admin/node_modules/aws-sdk/lib/request.js:22:10)
    at AcceptorStateMachine.runTo (/Users/me/.npm/_npx/87829/lib/node_modules/dynamodb-admin/node_modules/aws-sdk/lib/state_machine.js:14:12)
    at /Users/me/.npm/_npx/87829/lib/node_modules/dynamodb-admin/node_modules/aws-sdk/lib/state_machine.js:26:10
    at Request.<anonymous> (/Users/me/.npm/_npx/87829/lib/node_modules/dynamodb-admin/node_modules/aws-sdk/lib/request.js:38:9)
    at Request.<anonymous> (/Users/me/.npm/_npx/87829/lib/node_modules/dynamodb-admin/node_modules/aws-sdk/lib/request.js:685:12)
    at Request.callListeners (/Users/me/.npm/_npx/87829/lib/node_modules/dynamodb-admin/node_modules/aws-sdk/lib/sequential_executor.js:116:18)
  message:
   'Invalid ProjectionExpression: Syntax error; token: "-", near: "dummy-id"',
  code: 'ValidationException',
  time: 2019-04-11T20:58:56.048Z,
  requestId: '913a0d7b-cdd9-42e6-8b98-866894f156e2',
  statusCode: 400,
  retryable: false,
  retryDelay: 11.40472097566253 }

Credential Login

I think it would be valuable if we could have a default login, but we can update it as well so that we can safely deploy this onto servers.

Make port configurable

Could you please make the port dynamodb-admin runs on configurable from the terminal? We have two dynamo instances running locally and 8001 is one of the ports we are using. I had to clone the project and modify the dynamodb-admin.js confnig.

Request Entity Too Large

I work with large table entries that contain songs.
Each song has a large "lyrics" entry, and the a JSon array of objects that contain each individual word, plus some extra information (what part of speech is, what gender, number, etc).

Often I have to edit one of those words, say, in the middle of the array, and then hit the "Save" button, but get a Request Entity too large error.

I know it is not the length of the request per se, because I found a workaround:

  • removing the large song lyric entry
  • editing my word entry in the array
  • re-ingest the large lyric entry

This works, and results in a song table entry containing what I wanted, and is not "too large".

Here is an example stack

PayloadTooLargeError: request entity too large
    at readStream (/usr/local/lib/node_modules/dynamodb-admin/node_modules/raw-body/index.js:155:17)
    at getRawBody (/usr/local/lib/node_modules/dynamodb-admin/node_modules/raw-body/index.js:108:12)
    at read (/usr/local/lib/node_modules/dynamodb-admin/node_modules/body-parser/lib/read.js:77:3)
    at jsonParser (/usr/local/lib/node_modules/dynamodb-admin/node_modules/body-parser/lib/types/json.js:135:5)
    at Layer.handle [as handle_request] (/usr/local/lib/node_modules/dynamodb-admin/node_modules/express/lib/router/layer.js:95:5)
    at next (/usr/local/lib/node_modules/dynamodb-admin/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/usr/local/lib/node_modules/dynamodb-admin/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/usr/local/lib/node_modules/dynamodb-admin/node_modules/express/lib/router/layer.js:95:5)
    at /usr/local/lib/node_modules/dynamodb-admin/node_modules/express/lib/router/index.js:281:22
    at param (/usr/local/lib/node_modules/dynamodb-admin/node_modules/express/lib/router/index.js:354:14)

Is this an error, or I am misusing the tool?
I am next to null with nodeJS, but can help trying to find a solution, if someone gives me an idea where to look.

Show errors when put command is failed

Hi!
Thank for creating an awesome project!

Today I met strange behavior:

  1. I tried to put a new item into the table.
  2. Click 'Save', but nothing happened
  3. Console show that I have some error, but error description was not available

From my perspective, it will nice to show error.
What do you think about it?

Getting an error on 3.0.1

Running on Windows 10.
Node version: 8.12.0
Dynamodb is running on http://localhost:8000
dynamodb-admin version: 3.0.1

Running dynamodb-admin result with the error:
path.js:28
throw new TypeError('Path must be a string. Received ' + inspect(path));
^

TypeError: Path must be a string. Received undefined
at assertPath (path.js:28:11)
at Object.join (path.js:489:7)
at exports.createServer (C:\Users\xxxxxxxx\AppData\Roaming\npm\node_modules\dynamodb-admin\lib\backend.js:98:28)
at Object. (C:\Users\xxxxxxxx\AppData\Roaming\npm\node_modules\dynamodb-admin\bin\dynamodb-admin.js:33:13)
at Module._compile (module.js:653:30)
at Object.Module._extensions..js (module.js:664:10)
at Module.load (module.js:566:32)
at tryModuleLoad (module.js:506:12)
at Function.Module._load (module.js:498:3)
at Function.Module.runMain (module.js:694:10)

Dynalite crashes on opening the gui

Not sure if this is an issue with dynalite or dynamodb-admin per se.

When I run a dynalite server, as soon as I run dynamodb-admin and open a browser, dynalite crashes with this error:

  this.on('end', this.destroy.bind(this, null, null))
                              ^

TypeError: Cannot read property 'bind' of undefined

Has anyone else come across this? It seems to work fine when using local-dynamo (a thin wrapper around AWS DynamoDB Local).

Thanks

creating item from dynamodb-admin GUI always sets attribute to "L" for List/Array and there is no way to set attribute to "SS" (String Set) or any other set

eventhough https://github.com/aws/aws-sdk-js/blob/master/lib/dynamodb/document_client.js supports createSet, https://github.com/aaronshaf/dynamodb-admin/blob/master/lib/backend.js does not make use of createSet. There is no option available to control whether the created item's attributes will be Lists or Sets. backend.js simply calls putItem with params
{
TableName,
Item: req.body
}
It would be nice if backend.js checks for "special" param inside req.body and uses that to understand that certain attributes should be converted from Lists to Sets before invokng putItem. Anyother mechanism to control the choice of attributes will also be nice.

Viewport doesn't expand when resizing browser

When editing the JSON in the Item screen, if the browser window wasn't maximized, if one expands the browser, the JSON editing viewport (black part) doesn't accompany the resizing. One would expect that it expands alongside the browser screen.

Query using Secondary indexes

Not sure if I couldn't find this feature, or I somehow don't know how to use it, but the Amazon console, provides a way to query using the table secondary indexes that works way faster than scan.

Does this tool provide this feature?

Does not display any data

I downloaded this tool to give it a go today. I'm using DynamoDB_Local extensively during development and have node servers running locally accessing and modifying data in my local dynamo without any issues.
However, when running dynamodb-admin, I just get a page saying there are no tables. I can create new tables, but it doesn't list my existing ones.

I know for a fact that there are tables, since my other scripts, tools and my node apps all find the tables and data running with the same DYNAMO_ENDPOINT of http://localhost:8887.

Are there any known issues and/or how can I debug dynamo-admin to see where it fails?
(I tried --debug and --verbose flags with no luck).

Setup dynamodb-admin on top of localstack

Hi there,

I'm trying to setup dynamodb-admin to connect to the dynamodb of https://github.com/localstack/localstack.

My docker-compose.yml looks like this:

#docker-compose.yml
 services:
  localstack: 
  image: localstack/localstack
    ports:
      - 4567-4583:4567-4583
      - 4564:4564
      - 8000:8000
      - ${PORT_WEB_UI-8080}:${PORT_WEB_UI-8080}
    environment:
      - SERVICES=sqs,sns,cloudformation,dynamodb:8000,dynamodbstreams,kinesis
      - DEBUG=${DEBUG-1}
      - DATA_DIR=${DATA_DIR- }
      - PORT_WEB_UI=${PORT_WEB_UI- }
      - LAMBDA_EXECUTOR=${LAMBDA_EXECUTOR- }
      - KINESIS_ERROR_PROBABILITY=${KINESIS_ERROR_PROBABILITY- }
      - DOCKER_HOST=unix:///var/run/docker.sock
    volumes:
      - ./docker/tmp/localstack:/tmp/localstack
      - /var/run/docker.sock:/var/run/docker.sock
  dynamodb-admin:
      depends_on:
        - localstack
      image: aaronshaf/dynamodb-admin
      ports:
        - 8001:8001
      environment:
        - DYNAMO_ENDPOINT=http://localstack:8000

However, when I try to access the gui via http://localhost:8001 i run into a connection error.

{
  "error": {
    "message": "connect ECONNREFUSED 127.0.0.1:8000",
    "code": "NetworkingError",
    "errno": "ECONNREFUSED",
    "syscall": "connect",
    "address": "127.0.0.1",
    "port": 8000,
    "region": "us-east-1",
    "hostname": "localstack",
    "retryable": true,
    "time": "2018-06-01T11:55:57.415Z"
  }
}

Is there any possibilty to connect the gui with the dynamodb shipped with localstack ?

Thanks for any hints and support!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.