Will Lambda send events to EventBridge when a function is started and finished?

149 Views Asked by At

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

There are 2 best solutions below

0
On BEST ANSWER

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.

1
On

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.