Skip to content

Instantly share code, notes, and snippets.

@avovsya
Created April 11, 2016 08:59
Show Gist options
  • Save avovsya/fe3bcc06b1f4d6d4486815a66348fc17 to your computer and use it in GitHub Desktop.
Save avovsya/fe3bcc06b1f4d6d4486815a66348fc17 to your computer and use it in GitHub Desktop.
Split Amazon Kinesis shard using aws-cli
# Get list of streams
aws kinesis list-streams --region {region: us-east-1}
# Get list of shards for a stream
aws kinesis describe-stream --region {region: us-east-1} --stream-name {stream_name}
# Split
aws kinesis split-shard --region {region: us-east-1} --stream-name {stream_name} --shard-to-split {shard_id_to_split} --new-starting-hash-key {new_starting_hash_key:(shard ending hashkey / 2)}
# Check that it worked
aws kinesis describe-stream --region {region: us-east-1} --stream-name {stream_name}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment