How to use JS SDK V3 to getItem from DAX: "@aws-sdk/client-dax" instead of "amazon-dax-client"

0

Is it possible to read from DAX with benefit of SDK V3 for JS usage? I would like to configure reading from specified DAX endpoint but I can't find any details how to do it. I only found following solution for SDK V2:

    var dax = new AmazonDaxClient({endpoints: ["DaxClusterEndpoint"], region: region})
    daxClient = new AWS.DynamoDB.DocumentClient({service: dax });

I can't use DocumentClient from SDK V3 to initialize it with AmazonDaxClient from SDK V3 and I also can't find any option to use "@aws-sdk/client-dax" with specified endpoint and then add it to DynamoDBDocumentClient from V3.

Any suggestions if it's even possible? With usage of AmazonDaxClient my lambda is getting big in size.

已提問 2 年前檢視次數 1629 次
1 個回答
1
已接受的答案

Hi,

@aws-sdk/client-dax does not currently support Data Plane operations, only Control Plane such as CreateCluster.

There is currently a feature request in place for Data Plane functionality, I will add you as a +1 to that request. There is currently no ETA for the feature release.

For now we suggest to use the AWS JS SDK V2.

References

https://github.com/aws/aws-sdk-js-v3/issues/2575

profile pictureAWS
專家
已回答 2 年前
profile picture
專家
已審閱 1 個月前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南