Skip to content

Latest commit

 

History

History
29 lines (21 loc) · 1.47 KB

README.md

File metadata and controls

29 lines (21 loc) · 1.47 KB

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: make test

For tests and linting we use pytest, flake8 and 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.