How to implement log aggregation for AWS Lambda

Ship the logs for your Lambda functions to a log aggregation service such as
You can find blue­prints for ship­ping Cloud­Watch Logs to Sumo­log­ic, Splunk and Log­gly out of the box.
Match the Cre­ateL­og­Group API call in Cloud­Watch Logs and trig­ger a sub­scribe-log-group Lamb­da func­tion. This function would sub­scribe the new log group to the log shipping func­tion.
By default, logs for your Lamb­da func­tions are kept in CloudWatch Logs for­ev­er
Here’s a Lamb­da func­tion for auto-updat­ing the log reten­tion pol­i­cy to 30 days.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Yan Cui

AWS Serverless Hero. Helping companies go faster for less with serverless.