question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Dynamoose not using DocumentClient which makes DAX support useless

See original GitHub issue

Hello, I have been debugging our node app since we could not figure out why our dax cluster wasn’t being used (seen in metrics) even though it was configured according to the dynamoose docs. I started digging through the code and as far as I can see, documentClient is only used when running scans, so not for any put, get, query and so on. Is this really the case or have I gotten it all wrong?`

If that is the case, then DAX would not be leveraged for regular actions to the tables and rendering DAX pretty useless for a dynamoose setup.

Is there a way to get dynamoose to use the documentclient instead of the raw dynamodb methods from the aws sdk?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
dinhkimcommented, Jan 14, 2021

@kikemarto, I can use DAX with Dynamoose with below code:

const AmazonDaxClient = require('amazon-dax-client');
const dax = new AmazonDaxClient({endpoints: [endpoint], region: region});
 
const dynamoose = require("dynamoose");
dynamoose.aws.ddb.set(dax);
0reactions
dinhkimcommented, Mar 3, 2021

@ryanweaver718 , I didn’t see this error because I only use DAX lib for reading & writing data to Dynamodb table. From the error, it seems AmazonDaxClient does not implement createTable function. You must use AWS.DynamoDB class or use different way to create table.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamoose not using DocumentClient which makes DAX ...
Hello, I have been debugging our node app since we could not figure out why our dax cluster wasn't being used (seen in...
Read more >
dynamoose.setDocumentClient is not a function - Stack Overflow
I am using dynamoose@2.8.5 And trying to setup DAX with Dynamoose. Here is my code ... DocumentClient({ service: dax }); await dynamoose.
Read more >
FAQ | Dynamoose
Dynamoose requires strict conformance to your schema. If arrays or objects are empty, this is likely a case of not defining the sub-schema...
Read more >
What Is DynamoDB? Ultimate Intro for Beginners [2022]
DynamoDB is a perfect choice for Serverless applications because it follows the pay-what-you-use model and integrates perfectly with AWS Lambda ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found