@perform/lambda-powertools-kinesis-client

Kinesis client wrapper that knows how to forward correlation IDs (captured via @perform/lambda-powertools-correlation-ids)

Moved to @dazn/lambda-powertools-kinesis-client - please migrate to the new package by Tuesday 20th August 2019 as this package will be made private.
Last updated a year ago by automation-drone .
MIT · Original npm · Tarball · package.json
$ cnpm install @perform/lambda-powertools-kinesis-client 
SYNC missed versions from official npm registry.

lambda-powertools-kinesis-client

Kinesis client wrapper that knows how to forward correlation IDs (captured via @perform/lambda-powertools-correlation-ids).

Main features:

  • auto-injects correlation IDs into Kinesis records when you call putRecord or putRecords (only JSON payloads are supported currently)

  • direct replacement for AWS.Kinesis client

Getting Started

Install from NPM: npm install @perform/lambda-powertools-kinesis-client

API

It's exactly the same as the Kinesis client from the AWS SDK.

const Kinesis = require('@perform/lambda-powertools-kinesis-client')

const publishEvent = async () => {
  const putRecordReq = {
    StreamName: 'lambda-powertools-demo',
    PartitionKey: uuid(),
    Data: JSON.stringify({ message: 'hello kinesis' })
  }

  await Kinesis.putRecord(putRecordReq).promise()
}

const publishEvents = async () => {
  const putRecordsReq = {
    StreamName: 'lambda-powertools-demo',
    Records: [
      {
        PartitionKey: uuid(),
        Data: JSON.stringify({ message: 'hello kinesis' })
      },
      {
        PartitionKey: uuid(),
        Data: JSON.stringify({ message: 'hello lambda-powertools' })
      }
    ]
  }

  await Kinesis.putRecords(putRecordsReq).promise()
}

Current Tags

  • 1.8.0                                ...           latest (a year ago)

27 Versions

  • 1.8.0 [deprecated]           ...           a year ago
  • 1.5.0 [deprecated]           ...           a year ago
  • 1.3.0 [deprecated]           ...           a year ago
  • 1.1.7 [deprecated]           ...           2 years ago
  • 1.0.1 [deprecated]           ...           2 years ago
  • 1.0.0 [deprecated]           ...           2 years ago
  • 0.10.5 [deprecated]           ...           2 years ago
  • 0.10.4 [deprecated]           ...           2 years ago
  • 0.10.3 [deprecated]           ...           2 years ago
  • 0.10.2 [deprecated]           ...           2 years ago
  • 0.10.1 [deprecated]           ...           2 years ago
  • 0.10.0 [deprecated]           ...           2 years ago
  • 0.9.0 [deprecated]           ...           2 years ago
  • 0.8.0 [deprecated]           ...           2 years ago
  • 0.7.0 [deprecated]           ...           2 years ago
  • 0.6.4 [deprecated]           ...           2 years ago
  • 0.6.3 [deprecated]           ...           2 years ago
  • 0.6.2 [deprecated]           ...           2 years ago
  • 0.6.0 [deprecated]           ...           2 years ago
  • 0.5.0 [deprecated]           ...           2 years ago
  • 0.4.0 [deprecated]           ...           2 years ago
  • 0.3.0 [deprecated]           ...           2 years ago
  • 0.2.12 [deprecated]           ...           2 years ago
  • 0.2.11 [deprecated]           ...           2 years ago
  • 0.2.10 [deprecated]           ...           2 years ago
  • 0.2.9 [deprecated]           ...           2 years ago
  • 0.2.8 [deprecated]           ...           2 years ago
Maintainers (325)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 0
Dev Dependencies (0)
None
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |