Skip to main content

AWS Kinesis logger streamhandler with AWS Session Management

Project description

Kinesis Logger Stream Handler

This package contains

AwsSessionManagement - handles AWS Session with AWS Temp credentials by Assuming a given Role it renews the temp credentials when needed

AWS Kinesis Logger StreamHandler - a logging streamhandler which can send logs to AWS Kinesis


def get_kinesis_client(aws_access_key_id, aws_secret_access_key, aws_session_token):"creating/updating kinesis client ...")
    kinesis = boto3.client('kinesis', region_name=get_region(),
                           aws_access_key_id = aws_access_key_id,
                           aws_secret_access_key = aws_secret_access_key,
                           aws_session_token = aws_session_token)"returning new kinesis client")
    return kinesis

logger = logging.getLogger("my-package")

kinesisAwsSessionManagement = AwsSessionManagement(role_arn='roleArnValue',

kinesis_stream_handler = KinesisDataStreamHandler(kinesis_stream_name, 'subsystem_value', 'component_value', 'action_value', 'project_name', 'env', 'version', kinesisAwsSessionManagement)


Now, every logging call will send the logs both to console and kinesis data stream with a given 'kinesis_stream_name'

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for kinesis-logger-streamhandler, version 0.0.8
Filename, size File type Python version Upload date Hashes
Filename, size kinesis_logger_streamhandler-0.0.8-py3-none-any.whl (4.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size kinesis-logger-streamhandler-0.0.8.tar.gz (3.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page