A development team has been instructed to use Kinesis Streams to stream data from various web-based applications.
They also need to develop the consumer-based components.
Which of the following is used to specify the location from where you can start reading records from a Kinesis stream?
Click on the arrows to vote for the correct answer
A. B. C. D.Answer - B.
The AWS Documentation mentions the following.
Specify a shard iterator using the ShardIterator parameter.
The shard iterator specifies the position in the shard from which you want to start reading data records sequentially.
If there are no records available in the portion of the shard that the iterator points to, GetRecords returns an empty list.
It might take multiple calls to get to a portion of the shard that contains records.
Since this is clearly mentioned in the AWS Documentation , all other options are incorrect.
For more information on the GetRecords command, please refer to the below URL.
https://docs.aws.amazon.com/kinesis/latest/APIReference/API_GetRecords.htmlThe correct answer is B. ShardIterator.
When reading data from a Kinesis stream, a developer needs to specify the position in the stream from which to begin reading data. A shard iterator is used to specify the location from where you can start reading records from a Kinesis stream.
A shard is the basic unit of throughput in a Kinesis stream. Each shard can support up to 5 transactions per second for reads, up to a maximum total data read rate of 2 MB per second, and up to 1,000 records per second for writes, up to a maximum total data write rate of 1 MB per second.
A shard iterator is a unique identifier that is used to retrieve the set of records contained within a shard. You can retrieve a shard iterator by calling the GetShardIterator operation on a Kinesis stream. The GetShardIterator operation requires the name of the Kinesis stream, the shard ID, and a value that specifies where in the shard to start reading data.
The shard iterator can be used in subsequent operations to read data from the Kinesis stream. For example, you can use the shard iterator in the GetRecords operation to retrieve a set of records from the shard.
In summary, ShardIterator is used to specify the location from where you can start reading records from a Kinesis stream.