Difference between AWS SDK DynamoDB client and DocumentClient?

前端 未结 2 1032
心在旅途
心在旅途 2021-02-18 21:33

I want to know the difference between the AWS SDK DynamoDB client and the DynamoDB DocumentClient? In which use case should we use the DynamoDB client over the DocumentClient? <

2条回答
  •  半阙折子戏
    2021-02-18 22:04

    As per the announcement of the DocumentClient:

    The document client abstraction makes it easier to read and write data to Amazon DynamoDB with the AWS SDK for JavaScript. Now you can use native JavaScript objects without annotating them as AttributeValue types.

    It's basically a simpler way of calling dynamoDB in the SDK and it also converts annotated response data to native JS types. Generally you should only use the regular DynamoDB client when doing more "special" operations on your database like creating tables etc. That's stuff usually outside of the CRUD-scope.

提交回复
热议问题