The AWS Lambda console supports CloudWatch Log triggers. I think it would be very useful to include in SAM. I need this so that I can automatically stream my logs to SumoLogic without having to manually configure each lambda.
Yeah, it should be possible to support this.
+1
Any reason why this is not supported yet?
UPDATE
A workaround is possible with standard CloudFormation by manually defining a CloudWatch Logs subscription filter (AWS::Logs::SubscriptionFilter) to enable the event stream from a given CloudWatch Logs group to the Lambda function in question, along with a Lambda permission (AWS::Lambda::Permission) to grant CloudWatch Logs permission to invoke this Lambda function. It would still be nice to have this abstracted in SAM by supporting the CloudWatch Logs event trigger.
+1 ... workaround is fine, but definitely prefer SAM to directly support (simplify) Cloudwatch Logs as event source! Thanks!
The docs hint that this has been built and released. Has it?
Yes this is now available
Most helpful comment
+1
Any reason why this is not supported yet?
UPDATE
A workaround is possible with standard CloudFormation by manually defining a CloudWatch Logs subscription filter (
AWS::Logs::SubscriptionFilter) to enable the event stream from a given CloudWatch Logs group to the Lambda function in question, along with a Lambda permission (AWS::Lambda::Permission) to grant CloudWatch Logs permission to invoke this Lambda function. It would still be nice to have this abstracted in SAM by supporting the CloudWatch Logs event trigger.