aws-sherlock


Nameaws-sherlock JSON
Version 0.1.3 PyPI version JSON
download
home_pagehttps://github.com/ericvilla/aws-sherlock
SummaryCLI tool for extracting AWS CloudWatch Logs locally.
upload_time2025-09-11 07:38:33
maintainerNone
docs_urlNone
authorEric Villa
requires_python>=3.13
licenseMIT License Copyright (c) 2025 Eric Villa Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords aws cloudwatch logs cli analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Sherlock 🔍

CLI tool for extracting AWS CloudWatch Logs locally.

## Installation

### From PyPI
```bash
pip install aws-sherlock
```

## Configuration

Make sure you have AWS credentials configured.

Required permissions:
- `logs:FilterLogEvents`
- `logs:DescribeLogGroups`

## Usage
```bash
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](LICENSE) file for details.

## Author

**Eric Villa** - [eric@besharp.it](mailto:eric.villa91@gmail.com)
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ericvilla/aws-sherlock",
    "name": "aws-sherlock",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.13",
    "maintainer_email": null,
    "keywords": "aws, cloudwatch, logs, cli, analysis",
    "author": "Eric Villa",
    "author_email": "eric.villa91@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/0d/9f/52d72fc8dde37ece9da517f1d234f74cce7c80078af70dcb316b9d3f8ae0/aws_sherlock-0.1.3.tar.gz",
    "platform": null,
    "description": "# Sherlock \ud83d\udd0d\n\nCLI tool for extracting AWS CloudWatch Logs locally.\n\n## Installation\n\n### From PyPI\n```bash\npip install aws-sherlock\n```\n\n## Configuration\n\nMake sure you have AWS credentials configured.\n\nRequired permissions:\n- `logs:FilterLogEvents`\n- `logs:DescribeLogGroups`\n\n## Usage\n```bash\nsherlock --log-group \"my-log-group\" --start \"2025-09-10T12:00:00Z\" --end \"2025-09-10T12:15:00Z\" --region \"eu-central-1\" --filter-pattern \"UnwantedException\"\n```\n\n### Options\n\n| Option | Description | Required | Default |\n|--------|-------------|----------|---------|\n| `--log-group` | CloudWatch Log Group name | Yes | - |\n| `--start-time` | Start time for filtering (ISO8601 format) | Yes | - |\n| `--end-time` | End time for filtering (ISO8601 format) | Yes | - |\n| `--region` | End time for filtering (ISO8601 format) | Yes | - |\n| `--filter-pattern` | CloudWatch filter pattern | No | \"\" |\n| `--output` | Output file name | No | `logs.txt` |\n\n### Time Format\n\nTime parameters (`--start-time` and `--end-time`) must be in ISO8601 format:\n\n- `2025-09-10T14:30:00Z` (UTC timezone)\n- `2025-09-10T14:30:00+02:00` (with timezone offset)\n- `2025-09-10T14:30:00.123Z` (with milliseconds)\n\n## Output Format\n\nThe exported logs include the following columns:\n1. **Timestamp** - Original timestamp in milliseconds\n2. **Date** - Human-readable date (YYYY-MM-DD HH:MM:SS)\n3. **Log Stream** - CloudWatch log stream name\n4. **Message** - The actual log message\n\nExample output:\n```\n1757506004044\t2025-09-10 14:06:44\tmy-log-group/3cb6c84259584af3be92688fc6f809eb\tERROR: Application failure occurred\n```\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Author\n\n**Eric Villa** - [eric@besharp.it](mailto:eric.villa91@gmail.com)",
    "bugtrack_url": null,
    "license": "MIT License\n\nCopyright (c) 2025 Eric Villa\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.",
    "summary": "CLI tool for extracting AWS CloudWatch Logs locally.",
    "version": "0.1.3",
    "project_urls": {
        "Homepage": "https://github.com/ericvilla/aws-sherlock",
        "Issues": "https://github.com/ericvilla/aws-sherlock/issues",
        "Repository": "https://github.com/ericvilla/aws-sherlock"
    },
    "split_keywords": [
        "aws",
        " cloudwatch",
        " logs",
        " cli",
        " analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "829f8c1100328294c365bf6643b9b0ab3abd27c17236561ab0ffee02fd67dd53",
                "md5": "4b4f3e229ac64f5e38844649c7a02deb",
                "sha256": "306977a5b522ea0eaec3e07223a8094edd445522b5c96600fa8c19f96a979ad1"
            },
            "downloads": -1,
            "filename": "aws_sherlock-0.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4b4f3e229ac64f5e38844649c7a02deb",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.13",
            "size": 5519,
            "upload_time": "2025-09-11T07:38:32",
            "upload_time_iso_8601": "2025-09-11T07:38:32.438018Z",
            "url": "https://files.pythonhosted.org/packages/82/9f/8c1100328294c365bf6643b9b0ab3abd27c17236561ab0ffee02fd67dd53/aws_sherlock-0.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0d9f52d72fc8dde37ece9da517f1d234f74cce7c80078af70dcb316b9d3f8ae0",
                "md5": "7555299908dc7602e8c6f479e157c856",
                "sha256": "7466f4e6edabab33ba5a5edf4b86e9fbdb5a4c5e73e5ea1a35f14f299fcb063d"
            },
            "downloads": -1,
            "filename": "aws_sherlock-0.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "7555299908dc7602e8c6f479e157c856",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.13",
            "size": 3720,
            "upload_time": "2025-09-11T07:38:33",
            "upload_time_iso_8601": "2025-09-11T07:38:33.188484Z",
            "url": "https://files.pythonhosted.org/packages/0d/9f/52d72fc8dde37ece9da517f1d234f74cce7c80078af70dcb316b9d3f8ae0/aws_sherlock-0.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-11 07:38:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ericvilla",
    "github_project": "aws-sherlock",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "aws-sherlock"
}
        
Elapsed time: 5.01090s