capabilities.work

List Shards and Read From First

A 3-step recipe with Amazon Kinesis. We can help you get access.

Recipe · 3 steps

List Shards and Read From First

List shards, then read from the first shard at the trim horizon.

  1. List the shards in the stream and capture the id of the first shard to read from.
  2. Get a TRIM_HORIZON iterator for the first shard, positioning the reader at the oldest untrimmed record in that shard.
  3. Read records from the first shard using the iterator, returning the records and the next iterator for continued reading.
What you'll need to have ready
  • streamName: The name of the Kinesis data stream to inspect and read from.
For your developer

Arazzo workflow amazon-kinesis:list-shards-and-read-from-first, 3 operations: ListShards → GetShardIterator → GetRecords. Specs on APIs.io.