awslogs
awslogs is a simple command line tool to read aws cloudwatch logs.
What it is and what it does
awslogs is a lightweight CLI wrapper around boto3 for querying Amazon CloudWatch Logs. It lets you list log groups and streams, retrieve log events across multiple streams with time filtering, and watch logs in real-time—all from the command line. The tool supports human-friendly time syntax (e.g., '2h ago', '1d ago'), regex-based stream matching, CloudWatch filter patterns, and JSON query extraction, making it useful for ad-hoc log inspection and integration with Unix tools like grep.
The package depends on boto3, jmespath, termcolor, and python-dateutil. It requires Python 3.8 or later and AWS credentials configured through aws-cli, environment variables, or command-line arguments. The project is dormant but stable—no active development but no known vulnerabilities and a solid user base.
Use it for:
- Grep logs from multiple CloudWatch streams in the last 2 hours to find ERROR entries across a log group.
- List all log groups and streams in your AWS account without opening the AWS console.
- Watch logs in real-time as they arrive in CloudWatch using the --watch flag.
- Extract specific JSON fields from structured logs using --query to filter message content.
- Retrieve logs matching a CloudWatch filter pattern to find specific event types (e.g., Lambda REPORT lines).
- Integrate CloudWatch logs into shell scripts and CI/CD pipelines for log analysis and alerting.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
awslogs is a command-line tool for querying and streaming logs from Amazon CloudWatch, supporting log group and stream filtering, time-range queries, and real-time log watching.
Yes, if you need a lightweight CLI for CloudWatch log queries and don't require active development. The package is stable, has low install friction, and integrates well with Unix tools. The dormant maintenance status is acceptable for a mature tool with no known vulnerabilities, but expect no new features or rapid bug fixes. Use it for operational tasks and ad-hoc log inspection; avoid if you need ongoing feature development or support.
Install
awslogs on PyPI
pip
pip install awslogsuv
uv add awslogspoetry
poetry add awslogsInstalling awslogs
Before you install
Low install friction with four lightweight runtime dependencies. Maintenance is dormant (864 days since last release), though the repository remains active with 4988 stars and a recent commit in May 2024. Suitable for stable, established workflows but expect no active development.
License in practice
BSD permissive license allows use in commercial and proprietary projects with minimal restrictions.
Quickstart
pip install awslogs
awslogs groups
awslogs get /var/log/syslog ALL --start='2h ago' | grep ERROR
Requires AWS credentials configured via aws-cli, environment variables, or command-line flags; requires CloudWatch Logs read permissions.
Verify before relying
- Whether the package works with boto3 versions released after May 2024.
- Current compatibility with modern AWS CloudWatch API changes or new log features.
Package facts
| License | BSD (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — boto3, jmespath, termcolor, python-dateutil |
| Maintenance | dormant — 864 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 151,403/month — #10,934 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: awslogs-0.15.0-py2.py3-none-any.whl
Keywords: aws, logs, cloudwatch
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
aws-cdk.aws-logsProvides AWS CDK constructs for creating and…
permissive · top 15,000 on PyPI
watchtowerWatchtower is a Python logging handler that…
permissive · top 1,000 on PyPI
aws-embedded-metricsGenerates CloudWatch metrics embedded within…
permissive · top 5,000 on PyPI
awslabs.cloudwatch-mcp-serverExposes CloudWatch metrics, logs, alarms, and…
permissive · top 15,000 on PyPI
awscliProvides a unified command-line interface to…
permissive · top 1,000 on PyPI
cloudwatchA Python logging handler that sends log events…
permissive · top 15,000 on PyPI
kappaKappa is a command-line tool that automates the…
permissive · top 15,000 on PyPI
lambda-warmer-pyA decorator that minimizes AWS Lambda cold…
permissive · top 15,000 on PyPI
parsedmarcParses DMARC, TLS-RPT, and related email…
permissive · top 15,000 on PyPI
django-activity-streamDjango Activity Stream generates and displays…
permissive · top 15,000 on PyPI