Skip to main content

A powerful CLI tool for analyzing AWS CloudWatch Logs with ease

Project description

Sherlock 🔍

A powerful CLI tool for analyzing AWS CloudWatch Logs with ease.

Description

Sherlock is a Python-based command-line tool that helps you filter, analyze, and export AWS CloudWatch Logs. It provides an intuitive interface to search through your logs with custom filters and export them to readable formats with human-readable timestamps.

Features

  • 🔍 Filter CloudWatch Logs by time range and custom patterns
  • 📅 Convert timestamps to human-readable date formats
  • 📝 Export logs to text files with structured formatting
  • ⚡ Fast and efficient log processing
  • 🛡️ Built-in AWS authentication support

Installation

From PyPI

pip install sherlock

Configuration

Make sure you have AWS credentials configured.

Required permissions:

  • logs:FilterLogEvents
  • logs:DescribeLogGroups

Usage

sherlock --log-group "my-log-group" --start "2025-09-10T12:00:00Z" --end "2025-09-10T12:15:00Z" --region "eu-central-1" --filter-pattern "UnwantedException"

Options

Option Description Required Default
--log-group CloudWatch Log Group name Yes -
--start-time Start time for filtering (ISO8601 format) Yes -
--end-time End time for filtering (ISO8601 format) Yes -
--region End time for filtering (ISO8601 format) Yes -
--filter-pattern CloudWatch filter pattern No ""
--output Output file name No logs.txt

Time Format

Time parameters (--start-time and --end-time) must be in ISO8601 format:

  • 2025-09-10T14:30:00Z (UTC timezone)
  • 2025-09-10T14:30:00+02:00 (with timezone offset)
  • 2025-09-10T14:30:00.123Z (with milliseconds)

Output Format

The exported logs include the following columns:

  1. Timestamp - Original timestamp in milliseconds
  2. Date - Human-readable date (YYYY-MM-DD HH:MM:SS)
  3. Log Stream - CloudWatch log stream name
  4. Message - The actual log message

Example output:

1757506004044	2025-09-10 14:06:44	my-log-group/3cb6c84259584af3be92688fc6f809eb	ERROR: Application failure occurred

License

This project is licensed under the MIT License - see the LICENSE file for details.

Author

Eric Villa - eric@besharp.it

Project details


Download files

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

Source Distribution

aws_sherlock-0.1.0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aws_sherlock-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file aws_sherlock-0.1.0.tar.gz.

File metadata

  • Download URL: aws_sherlock-0.1.0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.4.0

File hashes

Hashes for aws_sherlock-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4a3fa4b7a36bb7fe1933f4929fe2292fa93ca1d9bdd8c29fd14c870689a3ddad
MD5 c347777f3bb3878a89c2aa5854d4478d
BLAKE2b-256 ea5e38bd4dd87c8483cc6f58a3aaeac0d3f087749a638c4dc216ab50eecd2f9f

See more details on using hashes here.

File details

Details for the file aws_sherlock-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: aws_sherlock-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.3 CPython/3.13.5 Darwin/24.4.0

File hashes

Hashes for aws_sherlock-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0b76a09f63b4683386ac1a4af2b9f5d9ff692f9469eda6ace0708724c36a7230
MD5 96b8fc39cd748d3f573f16ff906e2a12
BLAKE2b-256 00ddb102f406fa7eed49c9ddf6097cf431843d2d6ea1063dd3803a2adfc8cfb5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page