Skip to content

Instantly share code, notes, and snippets.

@gcla
Created June 23, 2016 20:51
Show Gist options
  • Save gcla/855804d6d7eda7cf85475d7a375181f8 to your computer and use it in GitHub Desktop.
Save gcla/855804d6d7eda7cf85475d7a375181f8 to your computer and use it in GitHub Desktop.
#!/usr/bin/env python
from boto import kinesis
import time
kinesis = kinesis.connect_to_region("us-east-1")
shard_id = 'shardId-000000000000'
shard_it = kinesis.get_shard_iterator("zigron", shard_id, "LATEST")["ShardIterator"]
while 1==1:
out = kinesis.get_records(shard_it, limit=2)
shard_it = out["NextShardIterator"]
print out;
time.sleep(0.2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment