Skip to content

Send and get real time data with AWS Kinesis with JavaScript.

Notifications You must be signed in to change notification settings

litsynp/kinesis-js-practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kinesis JS Practice

Play with your AWS Kinesis stream with JavaScript.

Requirements

  • AWS CLI installed and your credentials set up properly.
  • node

How to use

Set Up

Make sure you have correct AWS profile activated.

$ export AWS_PROFILE=default

When running the below scripts, you can inject environment variables like this.

$ KINESIS_STREAM=litsynp-test-stream-dev AWS_REGION=ap-northeast-1 npm run publish-events hello 1

Publish to Stream (PutRecord)

Push test data to stream with publish-events.

$ npm run publish-events [data] [iteration]
  • data - string data to put as record (default: Hello World!)
  • iteration - the number of times you want to send the data (default: 1)

Get Records

Retrieve the data you sent to the Kinesis stream.

$ npm run get-records [shard-id]
  • shard-id - The ShardID. (default: 0)

References

For more information about AWS CLI and injecting environment variables, refer to these links:

About

Send and get real time data with AWS Kinesis with JavaScript.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published