A powerful CLI tool for analyzing AWS CloudWatch Logs with ease
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:FilterLogEventslogs: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:
- Timestamp - Original timestamp in milliseconds
- Date - Human-readable date (YYYY-MM-DD HH:MM:SS)
- Log Stream - CloudWatch log stream name
- 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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file aws_sherlock-0.1.2.tar.gz.
File metadata
- Download URL: aws_sherlock-0.1.2.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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fcaa71fb7e8c3d0a79eeff3a0d0a16183a55bb780833fa878fe50da44437676f
|
|
| MD5 |
e548965e5fc4642796f3a4b5b0c734b2
|
|
| BLAKE2b-256 |
7a67b66d519ca6891f0204bcf6d40d003b547b5536d8a7380b0d1806f12ac137
|
File details
Details for the file aws_sherlock-0.1.2-py3-none-any.whl.
File metadata
- Download URL: aws_sherlock-0.1.2-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3548184af567363dca1d58f6dbd7513a7825fb0ab367f319fbb22f7dc57f12f5
|
|
| MD5 |
8a4ae8f56a03791434262b30ee405eed
|
|
| BLAKE2b-256 |
fca308124d833ae594d392a43292f06e5e8455b814f4b48fcf0c2730a372c57e
|