Create Lambda function triggered by CloudWatch log event

I’m trying to configure a Lambda function with serverless that would be triggered by a CloudWatch log event. For example, the Lambda function is triggered once an event appears in a specific log stream (RDSOSMetrics in my case). However the Serverless AWS Lambda Events page shows only few sources and CloudWatch is not among them. I know that I can trigger my function on schedule that could match the rate of CloudWatch logs but that wouldn’t be very practical. Can anyone advice on a way to get this done? Thank you.

This is planned (see the issue). Looking at the last few comments, someone said they would work on CW Logs event just a couple of days ago.

There’s also an example plugin mentioned on this old issue, but I can’t vouch for it.

1 Like