Arattian / DynamoDb-GUI-Client

DynamoDb GUI Client
MIT License
660 stars 77 forks source link

Table not showing on dynamodb-local #53

Closed ktwbc closed 5 years ago

ktwbc commented 5 years ago

Describe the bug When using dynamodb-local on Mac OSX, a blank table is not displaying in GUI Client even though aws cli will display it

To Reproduce Steps to reproduce the behavior:

  1. Use Mac OSX and homebrew
  2. Install dynamodb-local (brew cask install dynamodb-local)
  3. Run dynamodb local, will default to localhost:8000, output shown:
    $ dynamodb-local
    Initializing DynamoDB Local with the following configuration:
    Port:   8000
    InMemory:   false
    DbPath: null
    SharedDb:   false
    shouldDelayTransientStatuses:   false
    CorsParams: *
  4. Create a table. In my case it was a local node app creating the default example Music table:

     const profile = {
      region: 'us-west-2',
      endpoint: 'http://localhost:8000',
      convertEmptyValues: true,
    };
    
    const dynamoDb = new DynamoDB(profile);
    DynamoDB.DocumentClient(profile);
    
    const params = {
      AttributeDefinitions: [
        {
          AttributeName: 'Artist',
          AttributeType: 'S',
        },
        {
          AttributeName: 'SongTitle',
          AttributeType: 'S',
        },
      ],
      KeySchema: [
        {
          AttributeName: 'Artist',
          KeyType: 'HASH',
        },
        {
          AttributeName: 'SongTitle',
          KeyType: 'RANGE',
        },
      ],
      ProvisionedThroughput: {
        ReadCapacityUnits: 5,
        WriteCapacityUnits: 5,
      },
      TableName: 'Music',
    };
    
    return dynamoDb.createTable(params).promise();
  5. With aws cli, conirm table exists:
    aws dynamodb list-tables --endpoint-url http://localhost:8000
    {
    "TableNames": [
        "Music"
    ]
    }
  6. Connect to same localhost:8000 with Gui client, will always show "Empty database", even with refreshing on TABLES menu option.

Expected behavior Should display created blank table

Screenshots If applicable, add screenshots to help explain your problem.

Screenshot 2019-09-13 10 32 18 Screenshot 2019-09-13 10 35 05 Screenshot 2019-09-13 10 34 59

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

ktwbc commented 5 years ago

nevermind, user error -- my dynamodb did not have shared db turned on (and also no path on the db), so my node app and the GUI were seeing their own separate dynamo space instead of the same. Relaunching the dynamodb-local with sharedDb and a path fixed this.