skillfed

cloudwatch

A small handler for AWS Cloudwatch

cloudwatch v1.2.1 534.3K downloads/30d#6,135 on PyPI9
Permissive license DORMANT released

What it is and what it does

This package provides a lightweight Python logging handler that routes log messages to AWS CloudWatch. It wraps boto3 to integrate with Python's standard logging module, so you can add it as a handler to an existing logger without rewriting your logging code. The handler supports custom AWS credentials and regions, automatic log group and stream creation, and three strategies for handling oversized messages (error, truncate, or split) since CloudWatch has a 256 KB event size limit.

It is designed for scenarios where you want to centralize logs from infrastructure outside AWS (dedicated servers, on-premises systems) or where you want to separate logs from AWS-managed services like Lambda or ECS that already log automatically. You configure it once at logger creation time, then use Python's standard logging calls as usual.

Use it for:

  • Send logs from on-premises or non-AWS servers to CloudWatch for centralized monitoring and analysis.
  • Separate application logs from infrastructure logs in Lambda or ECS by explicitly routing to a custom log group.
  • Integrate CloudWatch logging into an existing Python codebase with minimal changes to logging setup code.
  • Handle large log messages by automatically truncating or splitting them to fit CloudWatch's 256 KB event limit.
  • Use custom AWS credentials for logging when the default environment credentials are not suitable.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

A Python logging handler that sends log events to AWS CloudWatch, integrating with Python's standard logging module to route messages to CloudWatch log groups and streams.

Yes, if you need to send Python logs to CloudWatch from non-AWS infrastructure or want explicit control over log routing. The package is stable, has no vulnerabilities, and integrates cleanly with Python's logging module. However, note that maintenance is dormant (last commit 2023-11-09); if you require active support or compatibility with future boto3 versions, verify that it still works in your environment before committing to it.

Install

cloudwatch on PyPI

pip

pip install cloudwatch

uv

uv add cloudwatch

poetry

poetry add cloudwatch

Installing cloudwatch

Before you install

Low install friction with a single runtime dependency (boto3). Maintenance is dormant—last commit was 2023-11-09, over a year ago—but the package is marked Production/Stable and has no known vulnerabilities, suggesting it is mature and unlikely to require frequent updates for its narrow scope.

License in practice

Licensed under MIT (permissive), so you can use, modify, and distribute this package freely with minimal restrictions.

Quickstart

pip install cloudwatch

import logging
from cloudwatch import cloudwatch

logger = logging.getLogger('my_logger')
handler = cloudwatch.CloudwatchHandler(log_group='my_log_group')
logger.addHandler(handler)
logger.warning('Watch out! Something happened!')

Requires valid AWS credentials (via CLI config, environment, or explicit parameters) and network access to AWS CloudWatch; boto3 must be installed.

Verify before relying

  • Whether the package works reliably with modern boto3 versions given the dormant maintenance status.
  • Performance characteristics when handling high-volume logging or large messages across multiple processes.

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.5)
Install friction low — pure-Python wheel
Runtime dependencies 1 — boto3
Maintenance dormant — 1,078 days since the last release
Last repo commit
First released
Downloads 534,281/month — #6,135 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: cloudwatch-1.2.1-py3-none-any.whl

Keywords: cloudwatch, aws, boto3, logging, logger

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Utilities

Tags

aws cloudwatch logging handlersend python logs to cloudwatchcloudwatch log handleraws logging integrationboto3 cloudwatch loggerpython logging to awscloudwatch event handler
aws-integrationlogging-handler

More Utilities packages