Socket
Socket
Sign inDemoInstall

kinesis-client

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kinesis-client

A tiny Kinesis client library


Version published
Weekly downloads
2
Maintainers
1
Weekly downloads
 
Created
Source

Build Status

Kinesis Client

A very minimal functional wrapper around the AWS SDK to provide a Kinesis Client. I'll extend as necessary.

The idea here is that the kinesis require functions more like a namespace containing functions than as an object.

NOT PRODUCTION READY

Usage

To use in a lambda, do something like the below:

const kinesis = require('kinesis-client');

var defaultOpts = {
  endpoint: 'localhost:4567',
  region: 'us-east-1',
  apiVersion: '2013-12-02',
  sslEnabled: false
};

module.exports.source = (event, context, callback) => {
  const kinesisClient = kinesis.createClient(defaultOpts);
  var streamName = 'events';
  var streamOpts = { ShardCount: 1, StreamName: streamName }

  kinesis.createStream(kinesisClient, streamOpts);

  console.log(event.body);

  kinesis.putRecord(kinesisClient,
                    {
                     Data: JSON.stringify(event.body),
                     PartitionKey: '0', // change this!
                     StreamName: streamName
                    });
};

TODO

Add more tests!

Licence

MIT

FAQs

Package last updated on 01 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc