Created
August 19, 2020 14:35
-
-
Save ashhadulislam/a8c52ed143aad0bcde502b677e97327a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from boto import kinesis | |
import time | |
kinesis = kinesis.connect_to_region("us-east-2") | |
shard_id = 'shardId-000000000000' #we only have one shard! | |
shard_it = kinesis.get_shard_iterator("end-stream", shard_id, "LATEST")["ShardIterator"] | |
while 1==1: | |
out = kinesis.get_records(shard_it, limit=1) | |
shard_it = out["NextShardIterator"] | |
# print(out) | |
if len(out["Records"])>0: | |
print(out["Records"][0]["Data"]) | |
time.sleep(0.3) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment