![Forrest logo](/images/logo.png)
aws-kinesis:tldr:c988a
aws-kinesis: Get a shard iterator for reading from the oldest message in a stream's shard.
$ aws kinesis get-shard-iterator --shard-iterator-type TRIM_HORIZON --stream-name ${name} --shard-id ${id}
try on your machine
This command is used with the AWS Command Line Interface (CLI) to retrieve a shard iterator for a specific shard in an Amazon Kinesis stream.
Here's a breakdown of the command and its parameters:
aws
: The command-line interface for interacting with AWS services.kinesis
: Specifies the AWS Kinesis service.get-shard-iterator
: The API operation to get a shard iterator.--shard-iterator-type TRIM_HORIZON
: Specifies the type of shard iterator to retrieve. In this case,TRIM_HORIZON
indicates that the iterator will point to the earliest available record in the shard.--stream-name ${name}
: Specifies the name of the Amazon Kinesis stream. You need to replace${name}
with the actual stream name you're working with.--shard-id ${id}
: Specifies the ID of the shard for which you want to get the shard iterator. You need to replace${id}
with the actual shard ID you're targeting.
By executing this command, you will receive a shard iterator that allows you to read records from the specified shard of the given Amazon Kinesis stream, starting from the earliest available record.
This explanation was created by an AI. In most cases those are correct. But please always be careful and
never run a command you are not sure if it is safe.