5.2 Check Data in Kinesis Data Stream
Check Data in Kinesis Data Stream
- Return to the terminal connected to your EC2 Instance from step 2.3 Create EC2 Instance.
- Run the following command to describe the Kinesis Data Stream:
aws kinesis describe-stream --stream-name fashion-ds
- Run the following command to get the shard iterator for the shard in the Kinesis Data Stream:
aws kinesis get-shard-iterator --stream-name fashion-ds --shard-id shardId-000000000000 --shard-iterator-type TRIM_HORIZON
- Copy the
ShardIterator
from the result of the previous command and run the following command to retrieve data from the Kinesis Data Stream:
aws kinesis get-records --shard-iterator <YOUR_SHARD_ITERATOR>
In the Records section:
- PartitionKey is the user ID
- Data contains JSON data encoded in the stream
To check the data, copy one of the Data fields inside Records. Go to Base64 Decode to decode the copied data.
- Decode as UTF-8