Amazon Kinesis Streams: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
Line 32: Line 32:


  aws kinesis put-record --stream-name my-stream --partition-key 1 --data testdata
  aws kinesis put-record --stream-name my-stream --partition-key 1 --data testdata
=Get a Record=
First then get a [[Amazon Kinesis#Shard_Iterator|shard iterator]] and then get the record:
SHARD_ITERATOR=$(aws kinesis get-shard-iterator --shard-id shardId-000000000000 --shard-iterator-type TRIM_HORIZON --stream-name bizEventIn --query 'ShardIterator')
aws kinesis get-records --shard-iterator $SHARD_ITERATOR

Revision as of 17:06, 25 October 2018

External

Internal

Overview

Kinesis Streams is aimed at users who want to build custom applications to process or analyze streaming data.

Amazon Kinesis Stream Access with Spring Data Cloud

Spring Cloud Stream AWS Kinesis Binder

AWS CLI Operations

Prerequisites

Set up the AWS credentials and region first.

List Streams

aws kinesis list-streams

Put a Record

aws kinesis put-record --stream-name my-stream --partition-key 1 --data testdata

Get a Record

First then get a shard iterator and then get the record:

SHARD_ITERATOR=$(aws kinesis get-shard-iterator --shard-id shardId-000000000000 --shard-iterator-type TRIM_HORIZON --stream-name bizEventIn --query 'ShardIterator')
aws kinesis get-records --shard-iterator $SHARD_ITERATOR