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

允我心安 提交于 2019-12-10 18:28:16

问题


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?


回答1:


Some aws services allow you to configure the log intervals such as elastic load balancing. There's a choice between five and sixty minute log intervals. You may not see a specific increment or parameter in the docs because they are configurable based on each service.




回答2:


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.



来源:https://stackoverflow.com/questions/43751161/how-does-amazon-cloudwatch-batch-logs-when-streaming-to-aws-lambda

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!