The problem is that the JavaScript console and your app use different profiles (credential and region) and therefore DynamoDB local will create separate database files for them. By using the -sharedDb flag when starting the local DynamoDB, a single database file will be shared for all clients.
From the doc:
-sharedDb — DynamoDB Local will use a single database file, instead of using separate files for each credential and region. If you specify -sharedDb, all DynamoDB Local clients will interact with the same set of tables regardless of their region and credential configuration.
Read full article from node.js - Dynamo Local from Node-aws: all operations fail "Cannot do operations on a non-existent table" - Stack Overflow
No comments:
Post a Comment