SumoLogic / sumologic-aws-lambda

A collection of lambda functions to collect data from Cloudwatch, Kinesis, VPC Flow logs, S3, security-hub and AWS Inspector
Other
151 stars 135 forks source link

First event into new logGroup won't invoke the subscribing function. #112

Closed amitbajaj45 closed 4 years ago

amitbajaj45 commented 4 years ago

If new log group creation is binded with new event creation, for example, in case of first run of new lambda function. Only after creation of Log group, event rule will be invoked to attach it to target lambda function. So first event will not be captured in target lambda function. Only subsequent events will be captured.

himanshu219 commented 4 years ago

yes I think this is a con. Because unless the log group exists lambda connector function can't subscribe to it. Then only subsequent events will be captured by cloudwatch collector lambda function. One hacky way is to create the empty log group by manually running your new lambda though it would be tedious if there are in huge number.