{"id":20806901,"url":"https://github.com/agentgill/cloudwatch-utils","last_synced_at":"2026-04-26T07:34:42.243Z","repository":{"id":152506991,"uuid":"600772777","full_name":"agentgill/cloudwatch-utils","owner":"agentgill","description":":white_check_mark: Simple AWS Python Utilities to Make Life Easier :fire:","archived":false,"fork":false,"pushed_at":"2024-12-23T13:12:20.000Z","size":25,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-18T13:38:37.756Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agentgill.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-02-12T15:00:39.000Z","updated_at":"2024-12-23T13:12:24.000Z","dependencies_parsed_at":"2025-01-18T13:36:47.461Z","dependency_job_id":"85626508-c3a5-4d69-a177-bc4d68983194","html_url":"https://github.com/agentgill/cloudwatch-utils","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentgill%2Fcloudwatch-utils","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentgill%2Fcloudwatch-utils/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentgill%2Fcloudwatch-utils/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agentgill%2Fcloudwatch-utils/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agentgill","download_url":"https://codeload.github.com/agentgill/cloudwatch-utils/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243152875,"owners_count":20244657,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-17T19:28:16.159Z","updated_at":"2025-12-26T07:17:31.728Z","avatar_url":"https://github.com/agentgill.png","language":"Python","readme":"# AWS CloudWatch - Utils\n\nThis is a collection of useful scripts for managing \u0026 interacting with AWS CloudWatch Logs \u0026 Metrics\n\n## Get Started\n\nClone this repo\n\nCreate a virtualenv on MacOS and Linux:\n\n```bash\npython3 -m venv .venv\n```\n\nInstall dependencies\n\n```bash\npip install -r requirements.txt\n```\n\nAfter the init process completes and the virtualenv is created, you can use the following\nstep to activate your virtualenv.\n\n```bash\nsource .venv/bin/activate\n```\n\n## Get CloudWatch Log Events\n\nUseful Python Script for outputing Cloudwatch Logs\n\n```bash\nusage: get-logs.py [-h] [--start START] [--end END] log_group\n\nPrint log event messages from a CloudWatch log group.\n\npositional arguments:\n  log_group      Name of the CloudWatch log group.\n\noptions:\n  -h, --help     show this help message and exit\n  --start START  Only print events with a timestamp after this time. (defaults to the start of today)\n  --end END      Only print events with a timestamp before this time. (defaults to the end of today)\n```\n\nOutput logs to terminal\n\n```bash\npython get_logs.py '/aws/lambda/mylambda' --start=\"25 Janurary at 00:00 am\" --end=\"25 January 2023 at 23:50 pm\"\n```\n\n```bash\npython get_logs.py '/aws/lambda/mylambda' --start=Yesterday --end=Now\n```\n\nOutput logs to local file\n\n```bash\npython get_logs.py '/aws/lambda/mylambda' --start=\"25 January at 00:00 am\" --end=\"25 January 2023 at 23:59 pm\" \u003e cloudwatch.log\n```\n\nCredits to Alex\n\n- [Alex Chan](https://github.com/alexwlchan)\n- [Fetching CloudWatch Logs](https://alexwlchan.net/2017/fetching-cloudwatch-logs/)\n\n## Get CloudWatch Metrics\n\nUseful Python Script for outputing Cloudwatch Mertics. Example easily identify errors counts by functions.\n\n```bash\nusage: get-metrics.py [-h] [--profile [P]] [--hours [H]] [--metric [M]]\n\nProcess AWS profile and time period.\n\noptions:\n  -h, --help     show this help message and exit\n  --profile [P]  The AWS profile to use\n  --hours [H]    The start time in hours\n  --metric [M]   The metric name to fetch (Errors, Invocations, Duration, Throttles, ConcurrentExecutions, etc\n```\n\n## Get Cost Usage Metrics\n\nUseful Python Script for outputing Daily Cost Usage Metrics\n\n```bash\nusage: get-cost-usage.py [-h] [--profile PROFILE] [metrics ...]\n\nGet AWS cost and usage data for today.\n\npositional arguments:\n  metrics            Metrics to retrieve (UnblendedCost, BlendedCost, UsageQuantity, etc))\n\noptions:\n  -h, --help         show this help message and exit\n  --profile PROFILE  AWS profile to use\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentgill%2Fcloudwatch-utils","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagentgill%2Fcloudwatch-utils","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagentgill%2Fcloudwatch-utils/lists"}