I would like EventBridge to be notified when any Lambda function starts and finishes execution.
I am NOT trying to trigger the Lambda functions from EventBridge.
I do NOT want to modify my Lambda function code to write custom events to EventBridge.
What I’m hoping for is some way to create a rule in EventBridge that will be triggered whenever any Lambda function in my account is started or finished. Is this possible?
2
Answers
Cloudwatch rule based on event patterns is not supported for AWS Lambda as of now (2023-11-02)
This is supported for various services like codebuild
We need to add a custom rule for this use case if we need to do that task.
What might work is to use CloudTrail (see Using CloudTrail to track function invocations https://docs.aws.amazon.com/lambda/latest/dg/logging-using-cloudtrail.html) and filter for those events in EventBridge.