Skip to content

Instantly share code, notes, and snippets.

@sushmithapopuri
Last active June 2, 2024 11:27
Show Gist options
  • Select an option

  • Save sushmithapopuri/27aa5d4e88e1c64a6b2fb89ef5a9524e to your computer and use it in GitHub Desktop.

Select an option

Save sushmithapopuri/27aa5d4e88e1c64a6b2fb89ef5a9524e to your computer and use it in GitHub Desktop.
import boto3
from common import session
current_session = session.get_session('qa')
client = current_session.client('kinesis')
response = client.put_record(
StreamName='bdc-kinesis-qa',
Data=b'<sample></sample',
PartitionKey='1',
StreamARN='arn:aws:kinesis:eu-west-1:xxxxxxxxxx:stream/kinesis-name'
)
# response = client.get_records(
# ShardIterator='shardId-000000000068',
# Limit=123,
# StreamARN='arn:aws:kinesis:eu-west-1:xxxxxxxx:stream/kinesis-name'
# )
response = client.put_record(
StreamName='stream name',
Data=b'test',
PartitionKey='shardId-000000000000',
StreamARN='arn:aws:kinesis:eu-west-1:xxxxxxx:stream/kinesis'
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment