https://github.com/oslokommune/okdata-log-group-subscriber
Auto-subscribe to CloudWatch Log Groups
https://github.com/oslokommune/okdata-log-group-subscriber
dataplatform
Last synced: 5 months ago
JSON representation
Auto-subscribe to CloudWatch Log Groups
- Host: GitHub
- URL: https://github.com/oslokommune/okdata-log-group-subscriber
- Owner: oslokommune
- License: mit
- Created: 2021-10-29T13:40:49.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2026-01-12T08:22:09.000Z (5 months ago)
- Last Synced: 2026-01-12T18:06:18.740Z (5 months ago)
- Topics: dataplatform
- Language: Python
- Homepage:
- Size: 591 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# okdata-log-group-subscriber
AWS Lambda function for automatically setting up subscriptions to new CloudWatch
Log Groups when they are created. Configure the function by setting the
following environment variables:
| Variable name | Description |
|----------------------------|---------------------------------------------------------------------------------------|
| `DESTINATION_ARN` | ARN of the resource to set up subscriptions for. |
| `FILTER_PATTERN` | Only log entries matching this pattern are sent to the destination. |
| [`SUBSCRIPTION_WHITELIST`] | Optional regex. Create subscriptions only for log groups with names matching this. |
| [`SUBSCRIPTION_BLACKLIST`] | Optional regex. Don't create subscriptions for log groups with names containing this. |
Note that CloudTrail logging *must* be enabled on the AWS account in order for
this component to be able to subscribe to `CreateLogGroup` events.
## Tests
Tests are run using [tox](https://pypi.org/project/tox/): `make test`
For tests and linting we use [pytest](https://pypi.org/project/pytest/),
[flake8](https://pypi.org/project/flake8/) and
[black](https://pypi.org/project/black/).
## Deploy
Deploy to both dev and prod is automatic via GitHub Actions on push to main. You
can alternatively deploy from local machine with: `make deploy` or `make
deploy-prod`.