Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.19 KB

readme.md

File metadata and controls

44 lines (31 loc) · 1.19 KB

aws-ddb-with-xray CircleCI npm (scoped)

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

Install

$ yarn add @shelf/aws-ddb-with-xray

Usage

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

$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tags

License

MIT © Shelf