Amazon Kinesis · Arazzo Workflow
Amazon Kinesis List Shards and Read From First
Version 1.0.0
List a stream's shards, then read from the first shard from the trim horizon.
Provider
Workflows
list-shards-and-read-from-first
List shards, then read from the first shard at the trim horizon.
Lists the shards in the stream, takes the first shard id, gets a TRIM_HORIZON iterator for it, and reads the records from the start of the shard.
1
listShards
ListShards
List the shards in the stream and capture the id of the first shard to read from.
2
getShardIterator
GetShardIterator
Get a TRIM_HORIZON iterator for the first shard, positioning the reader at the oldest untrimmed record in that shard.
3
getRecords
GetRecords
Read records from the first shard using the iterator, returning the records and the next iterator for continued reading.