Code Monkey home page Code Monkey logo

Comments (10)

aheissenberger avatar aheissenberger commented on May 23, 2024 3

I had a similar problem and solved it by using the same configuration as used by the app - e.g.:

AWS_SECRET_ACCESS_KEY=fake AWS_ACCESS_KEY_ID=fake AWS_REGION=us-fake-1 DYNAMO_ENDPOINT=http://localhost:8000 dynamodb-admin

from dynamodb-admin.

rchl avatar rchl commented on May 23, 2024

DYNAMO_ENDPOINT you are trying to use is the same as default and region/key doesn't matter for local instance so I can't really see what's wrong. Maybe there is some error in the browser in inspector's console?

from dynamodb-admin.

sashokbg avatar sashokbg commented on May 23, 2024

@aheissenberger you are absolutely right, it worked !

It seems that my tables and items were created using my real AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY so it probably created internally a new instance with the triple [AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION]

You should probably update your README and code :)

In other words the code in https://github.com/aaronshaf/dynamodb-admin/blob/1578feb7fb4698f7ae1c4f70bb8c603084282957/lib/backend.js at line 19 is wrong. It should check if there are local credentials present in the system under ~/.aws/credentials and use them

from dynamodb-admin.

rchl avatar rchl commented on May 23, 2024

I don't really understand what the problem was.

If you don't specify ID/SECRET then it will use some key/secret. Why did that not work for you? Do you need to use actual ID/SECRET that you have defined in your ~/.aws/credentials? I thought that local instance of dynamodb accepts any ID/SECRET so it should work regardless?

from dynamodb-admin.

sashokbg avatar sashokbg commented on May 23, 2024

It seems that a dynamodb instance is defined by [REGION, KEY, SECRET]. When you start the dynamodb-admin app it uses dummy key/secret so your instance is ['us_east-1', 'key', 'secret']

Then I start my real application that reads my real key/secret inside ~/.aws/credentials and tries to connect to ['eu-west-1', 'my-real-key', 'my-real-secret'] which is NOT the same base, thus the behavior described in my original post.

from dynamodb-admin.

sashokbg avatar sashokbg commented on May 23, 2024

Here is the documentation that supports my claim:

https://docs.aws.amazon.com/amazondynamodb/latest/developerguide/DynamoDBLocal.UsageNotes.html

If you use the -sharedDb option, DynamoDB creates a single database file named shared-local-instance.db. Every program that connects to DynamoDB accesses this file. If you delete the file, you lose any data that you have stored in it.

If you omit -sharedDb, the database file is named myaccesskeyid_region.db, with the AWS access key ID and Region as they appear in your application configuration. If you delete the file, you lose any data that you have stored in it.

from dynamodb-admin.

rchl avatar rchl commented on May 23, 2024

Fix integrated in v3.0.0

from dynamodb-admin.

mrthebob avatar mrthebob commented on May 23, 2024

This doesn't seem to be fixed for me - it's not reading the ~/.aws/credential file -- I have to specify them manually, and I'm using v3.1.0

from dynamodb-admin.

rchl avatar rchl commented on May 23, 2024

Are your credentials stored in [default] section in credentials file?

from dynamodb-admin.

rchl avatar rchl commented on May 23, 2024

Also, correct file name is ~/.aws/credentials ('s' is missing in the path you wrote).

from dynamodb-admin.

Related Issues (20)

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.