Failed integrating with AWS DAX
See original GitHub issueHi, I am currently integrating newrelic agent into our application.
I noticed that if I use AWS DAX as a replacement of DynamoDB client, I always got an error on every DB manipulation.
const dax = new AmazonDaxClient({ region: 'us-east-1', endpoints: ['some.endpoint'] });
const dbClient = new AWS.DynamoDB.DocumentClient({ service: dax });
await dbClient.query({ ... }).promise();
Cannot read property 'host' of undefined
error: TypeError: Cannot read property 'host' of undefined
at DocumentClient.wrapOperation (/home/ec2-user/async_worker/node_modules/@newrelic/aws-sdk/lib/dynamodb.js:64:39)
at DocumentClient.opRecorder (/home/ec2-user/async_worker/node_modules/newrelic/lib/shim/datastore-shim.js:411:24)
at DocumentClient.wrapper [as get] (/home/ec2-user/async_worker/node_modules/newrelic/lib/shim/shim.js:927:33)
...
But a regular DynamoDB client works fine.
const ddb = new AWS.DynamoDB({ region: 'us-east-1' });
const dbClient = new AWS.DynamoDB.DocumentClient({ service: ddb });
await dbClient.query({ ... }).promise();
Tried @newrelic/aws-sdk
but the issue remains.
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
DAX and DynamoDB consistency models - AWS Documentation
If a write to DynamoDB fails for any reason, including throttling, the item is not cached in DAX. The exception for the failure...
Read more >Troubleshoot “No endpoints available” errors in DAX
"No endpoints available" errors occur when the client doesn't have a network route to any nodes of the DAX cluster.
Read more >In-memory acceleration with DynamoDB Accelerator (DAX)
Get faster performance and lower latency when reading from Amazon DynamoDB with DAX, a managed, in-memory, write-through cache you can deploy for demanding ......
Read more >Managing DAX clusters - Amazon DynamoDB
DAX is integrated with AWS CloudTrail, allowing you to audit DAX cluster activities. You can use CloudTrail logs to view all the changes...
Read more >Modifying an existing application to use DAX
If you already have a Java application that uses Amazon DynamoDB, you can modify it so that it can access your DynamoDB Accelerator...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
A new version of the agent has been deployed including the new version of the
aws-sdk
instrumentation. Please let us know if you have further issues.@seoker The
aws-sdk
wasn’t rolled into the agent for auto-install until version 6.1.0. So any earlier version should avoid that.