Skip to main content

CLI tool for extracting AWS CloudWatch Logs locally.

Project description

Sherlock 🔍

CLI tool for extracting AWS CloudWatch Logs locally.

Installation

From PyPI

pip install aws-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.villa91@gmail.com

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.4.tar.gz (3.7 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.4-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: aws_sherlock-0.1.4.tar.gz
  • Upload date:
  • Size: 3.7 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.4.tar.gz
Algorithm Hash digest
SHA256 a55741144d99f489b2066b422c05fdda984e9712b9a762f4fc4430bd97b1de0c
MD5 c5402860766cc8c43ce4be43d48ad4e4
BLAKE2b-256 9ffcb39922124773009f8d96680aa76f2dd0ac3e2bae9b636fd64868b7aa39b7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: aws_sherlock-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 5.5 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.4-py3-none-any.whl
Algorithm Hash digest
SHA256 7fbdaa1c3831fb563daf51c9c57cd8c89b5947e0d8b8051ae75fb9ff3afc4aa0
MD5 18d093a29d042f8f823575fc459cb362
BLAKE2b-256 f02b8ce608d9fba4cff8aa5cf1ebded7c60b52dfe2c5a60c2f8c03477bd92332

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