Skip to content

SplitShard

Source: src/AWS/Kinesis/SplitShard.ts

Runtime binding for kinesis:SplitShard.

Bind this operation to a Stream to split one shard of a PROVISIONED-mode stream into two — the stream ARN is injected automatically. Useful for building custom shard-scaling logic that targets a hot shard directly (the Stream resource’s shardCount prop covers uniform scaling via UpdateShardCount). Provide the implementation with Effect.provide(AWS.Kinesis.SplitShardHttp).

// init — bind the operation to the stream
const splitShard = yield* AWS.Kinesis.SplitShard(stream);
// runtime — split at the midpoint of the shard's hash-key range
yield* splitShard({
ShardToSplit: "shardId-000000000000",
NewStartingHashKey: "170141183460469231731687303715884105728",
});