SubscribeToShard
Source:
src/AWS/Kinesis/SubscribeToShard.ts
Runtime binding for kinesis:SubscribeToShard (enhanced fan-out).
Bind this operation to a StreamConsumer (a registered enhanced fan-out
consumer) to open a push-based subscription to a shard — the consumer ARN
is injected automatically. Provide the implementation with
Effect.provide(AWS.Kinesis.SubscribeToShardHttp).
Enhanced Fan-Out
Section titled “Enhanced Fan-Out”const consumer = yield* AWS.Kinesis.StreamConsumer("Analytics", { streamArn: stream.streamArn,});// init — bind the operation to the registered consumerconst subscribeToShard = yield* AWS.Kinesis.SubscribeToShard(consumer);
// runtime — open the subscriptionconst result = yield* subscribeToShard({ ShardId: shardId, StartingPosition: { Type: "LATEST" },});// result.EventStream delivers records for up to 5 minutes