{"id":16782176,"url":"https://github.com/marco-streng/patch-log-groups-multi-region","last_synced_at":"2025-04-10T21:22:39.409Z","repository":{"id":65552689,"uuid":"593938860","full_name":"marco-streng/patch-log-groups-multi-region","owner":"marco-streng","description":"CDK construct to set Log Retention over all AWS Regions.","archived":false,"fork":false,"pushed_at":"2025-04-10T00:17:20.000Z","size":582,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-10T01:25:26.348Z","etag":null,"topics":["aws","cdk","cloudwatch","construct"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marco-streng.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":"2023-01-27T07:42:22.000Z","updated_at":"2025-02-28T13:34:10.000Z","dependencies_parsed_at":"2024-03-18T01:30:22.480Z","dependency_job_id":"a5511b1c-cea8-4780-946d-3427ca5fd59e","html_url":"https://github.com/marco-streng/patch-log-groups-multi-region","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"6c5891f72c2f2858e064b074908d8b785b48e03f"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marco-streng%2Fpatch-log-groups-multi-region","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marco-streng%2Fpatch-log-groups-multi-region/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marco-streng%2Fpatch-log-groups-multi-region/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marco-streng%2Fpatch-log-groups-multi-region/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marco-streng","download_url":"https://codeload.github.com/marco-streng/patch-log-groups-multi-region/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248145137,"owners_count":21055061,"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":["aws","cdk","cloudwatch","construct"],"created_at":"2024-10-13T07:44:36.493Z","updated_at":"2025-04-10T21:22:39.390Z","avatar_url":"https://github.com/marco-streng.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Patch Log Groups Multi Region\n\nCDK construct to set log retention on CloudWatch log groups over multiple AWS regions. Usefull to fullfill compliance requirements also for dynamically generated log groups worldwide (e.g. by Lambda@Edge).\n\n![architecture diagram](https://raw.githubusercontent.com/marco-streng/patch-log-groups-multi-region/main/arch.jpg)\n\n## Getting started\n\n### Installation\n\nnpm:\n\n```shell\nnpm install --save patch-log-group-multi-region\n```\n\nyarn:\n\n```shell\nyarn add patch-log-group-multi-region\n```\n\n### Usage\n\nAdd the construct to your stack like in the following example:\n\n```typescript\nnew PatchLogGroups(stack, \"PatchLogGroups\", {\n  regions: [\"eu-west-1\", \"eu-central-1\"],\n  schedule: aws_events.Schedule.cron({\n    minute: \"0\",\n    hour: \"0\",\n  }),\n});\n```\n\n### Additional configuration options\n\n```typescript\nnew PatchLogGroups(stack, \"PatchLogGroups\", {\n  regions: [\"eu-west-1\", \"eu-central-1\"], // List of AWS regions in which the function should run\n  schedule: aws_events.Schedule.cron({ minute: \"0\", hour: \"0\" }), // Schedule event for the event rule\n  retentionInDays: 30, // Number of days to which log retention should be set.\n  logGroupNamePrefix: \"aws/lambda\", // Prefix for log group names that should be effected.\n  logsResources: [\n    \"arn:aws:logs:eu-west-1:0123456789:log-group:*:*\",\n    \"arn:aws:logs:eu-central-1:0123456789:log-group:*:*\",\n  ], // Resource ARNs to add to the Lambda execution role policy statement.\n});\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarco-streng%2Fpatch-log-groups-multi-region","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarco-streng%2Fpatch-log-groups-multi-region","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarco-streng%2Fpatch-log-groups-multi-region/lists"}