Skip to content

GetShardIterator

Source: src/AWS/Kinesis/GetShardIterator.ts

Runtime binding for kinesis:GetShardIterator.

Bind this operation to a Stream to obtain a shard iterator — the starting position for reading records with AWS.Kinesis.GetRecords. The stream name is injected automatically. Provide the implementation with Effect.provide(AWS.Kinesis.GetShardIteratorHttp).

// init
const getShardIterator = yield* AWS.Kinesis.GetShardIterator(stream);
// runtime
const iterator = yield* getShardIterator({
ShardId: shardId,
ShardIteratorType: "LATEST",
});
// pass iterator.ShardIterator to getRecords