Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does Amazon CloudWatch batch logs when streaming to AWS Lambda?

The AWS documentation indicates that multiple log event records are provided to Lambda when streaming logs from CloudWatch.

logEvents
The actual log data, represented as an array of log event records. The "id" property is a unique identifier for every log event.

How does CloudWatch group these logs?

Time? Count? Randomly, from my perspective?

like image 638
Dan Avatar asked Aug 05 '26 20:08

Dan


1 Answers

Currently you get one Lambda invocation for every PutLogEvents batch that CloudWatch Logs had received against that log group. However you should probably not rely on that because AWS could always change it (for example batch more, etc).

You can observe this behavior by running the CWL -> Lambda example in the AWS docs.

like image 103
Daniel Vassallo Avatar answered Aug 08 '26 11:08

Daniel Vassallo



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!