https://github.com/shelfio/aws-ddb-with-xray
AWS DynamoDB Document Client initialized with X-Ray
https://github.com/shelfio/aws-ddb-with-xray
aws dynamodb xray
Last synced: about 1 year ago
JSON representation
AWS DynamoDB Document Client initialized with X-Ray
- Host: GitHub
- URL: https://github.com/shelfio/aws-ddb-with-xray
- Owner: shelfio
- License: mit
- Created: 2019-11-10T13:33:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2025-05-27T21:22:35.000Z (about 1 year ago)
- Last Synced: 2025-05-27T22:29:20.294Z (about 1 year ago)
- Topics: aws, dynamodb, xray
- Language: TypeScript
- Size: 168 KB
- Stars: 9
- Watchers: 21
- Forks: 0
- Open Issues: 10
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
README
# aws-ddb-with-xray [](https://circleci.com/gh/shelfio/aws-ddb-with-xray/tree/master)  [](https://www.npmjs.com/package/@shelf/aws-ddb-with-xray)
> Adding X-Ray to DynamoDB Document Client requires a hack (see https://git.io/JeaSG). This package encapsulates that logic. Also, it imports only the DynamoDB client not the full aws-sdk [for better performance](https://theburningmonk.com/2019/03/just-how-expensive-is-the-full-aws-sdk/)
## Install
```
$ yarn add @shelf/aws-ddb-with-xray
```
## Usage
```js
const {getDocumentClient} = require('@shelf/aws-ddb-with-xray');
const ddb = getDocumentClient({
ddbParams: {region: 'us-east-1', convertEmptyValues: true},
ddbClientParams: {region: 'us-east-1'},
});
await ddb
.get({
TableName: 'foo',
Key: {hash_key: 'bar'},
})
.promise();
```
## Result

## Publish
```sh
$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tags
```
## License
MIT © [Shelf](https://shelf.io)