{"id":13625873,"url":"https://github.com/binxio/aws-cloudwatch-log-minder","last_synced_at":"2026-04-08T19:31:34.973Z","repository":{"id":35111090,"uuid":"207901535","full_name":"binxio/aws-cloudwatch-log-minder","owner":"binxio","description":"command line utility and Lambda to maintain AWS Cloudwatch logs","archived":false,"fork":false,"pushed_at":"2023-11-04T17:42:58.000Z","size":143,"stargazers_count":65,"open_issues_count":5,"forks_count":21,"subscribers_count":6,"default_branch":"master","last_synced_at":"2026-02-10T19:14:56.953Z","etag":null,"topics":["aws","aws-lambda","cli","cloudwatch-logs","utility"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/binxio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2019-09-11T20:32:09.000Z","updated_at":"2025-02-18T18:35:58.000Z","dependencies_parsed_at":"2024-06-11T17:14:32.224Z","dependency_job_id":null,"html_url":"https://github.com/binxio/aws-cloudwatch-log-minder","commit_stats":{"total_commits":130,"total_committers":14,"mean_commits":9.285714285714286,"dds":"0.49230769230769234","last_synced_commit":"6195cff5e4e4ee3510f6734ed962ebbc89e7239d"},"previous_names":[],"tags_count":30,"template":false,"template_full_name":null,"purl":"pkg:github/binxio/aws-cloudwatch-log-minder","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binxio%2Faws-cloudwatch-log-minder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binxio%2Faws-cloudwatch-log-minder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binxio%2Faws-cloudwatch-log-minder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binxio%2Faws-cloudwatch-log-minder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/binxio","download_url":"https://codeload.github.com/binxio/aws-cloudwatch-log-minder/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/binxio%2Faws-cloudwatch-log-minder/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31571600,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["aws","aws-lambda","cli","cloudwatch-logs","utility"],"created_at":"2024-08-01T21:02:04.294Z","updated_at":"2026-04-08T19:31:34.951Z","avatar_url":"https://github.com/binxio.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# AWS Cloudwatch Log minder\nAWS CloudWatch logs is an useful logging system, but it has two quircks. It does not allow you too set a default\nretention period for newly created log groups, and it does not delete empty log streams that are older than\nthe retention period. This utility:\n\n1. sets a default retention period on log groups without a period set.\n1. removes empty log streams older than the retention period of the log group\n\nYou can use it as a command line utility. You can also install it as an AWS Lambda function and have your\nlogs kept in order, NoOps style!\n\n## install the log minder\nto install the log minder, type:\n\n```sh\npip install aws-cloudwatch-log-minder\n```\n\n## set default retention period\nto set the default retention period on log groups without one, type:\n```sh\ncwlog-minder --dry-run set-log-retention --days 30\n```\nThis will show you which log groups will have its retention period set. Remove the `--dry-run` and\nit the retention period will be set. If you wish to set the retention of all log groups to the same\nvalue, type:\n```sh\ncwlog-minder --dry-run set-log-retention --days 30 --overwrite\n```\n\n## delete empty log streams\nTo delete empty log streams older than the retention period, type:\n```sh\ncwlog-minder --dry-run delete-empty-log-streams\n```\nThis will show you which empty log streams will be deleted. Remove the `--dry-run` and\nthese stream will be deleted.\n\n\n## deploy the log minder\nTo deploy the log minder as an AWS Lambda, type:\n\n```sh\ngit clone https://github.com/binxio/aws-cloudwatch-log-minder.git\ncd aws-cloudwatch-log-minder\naws cloudformation deploy \\\n\t--capabilities CAPABILITY_IAM \\\n\t--stack-name aws-cloudwatch-log-minder \\\n\t--template-file ./cloudformation/aws-cloudwatch-log-minder.yaml \\\n\t--parameter-overrides LogRetentionInDays=30\n```\nThis will install the log minder in your AWS account and run every hour.\n\n## delete empty log groups\nTo delete empty log groups, type:\n```sh\ncwlog-minder --dry-run delete-empty-log-groups\n```\nThis will show you which empty log groups will be deleted. Remove the `--dry-run` and\nthese groups will be deleted. Do not use this command, if your log groups are\nmanaged by CloudFormation or Terraform.\n\n## verbose\n\n```sh\nexport LOG_LEVEL=DEBUG\ncwlog-minder ...\n```\n\n## region and profile selection\nAWS regions and credential profiles can be selected via command line\narguments or environment variables.\n\n### region via parameter\n```sh\ncwlog-minder --region eu-west-1 ...\n```\n\n### region via environment\n```sh\nexport AWS_DEFAULT_REGION=eu-west-1\ncwlog-minder ...\n```\n\n### profile via parameter\n```sh\ncwlog-minder --profile dev ...\n```\n\n### profile via environment\n\n```sh\nexport AWS_PROFILE=dev\ncwlog-minder ...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinxio%2Faws-cloudwatch-log-minder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbinxio%2Faws-cloudwatch-log-minder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbinxio%2Faws-cloudwatch-log-minder/lists"}