arunmr1980 / aws-kinesis-logger

MIT License
0 stars 0 forks source link

Kinesis Logger POC #1

Open arunmr1980 opened 2 years ago

arunmr1980 commented 2 years ago

TODO

References

arunmr1980 commented 2 years ago

Writing to a Kinesis stream

Writing to a kinesis steam can be done in multiple ways

arunmr1980 commented 2 years ago

Basic Kinesis operations using aws cli

https://docs.aws.amazon.com/streams/latest/dev/fundamental-stream.html#put-record

  1. Create a stream

    aws kinesis create-stream --stream-name Foo aws kinesis describe-stream-summary --stream-name Foo

  2. Insert a record

    aws kinesis put-record --stream-name --partition-key 123 --data testdata

  3. Get the record

    aws kinesis get-shard-iterator --shard-id shardId-000000000000 --shard-iterator-type TRIM_HORIZON --stream-name kinesis-app-stream-q0wLn5UvbB12 aws kinesis get-records --shard-iterator

  4. Delete stream

    aws kinesis delete-stream --stream-name Foo

arunmr1980 commented 2 years ago

Producer using AWS sdk

Sample code https://github.com/awsdocs/aws-doc-sdk-examples/blob/main/javav2/example_code/kinesis/src/main/java/com/example/kinesis/StockTradesWriter.java