Skip to content

Same CloudTrail event triggering (using EventBridge Rule) Lambda function many times

0

Hello, could someone explain to me why the same CloudTrail event is triggering a Lambda function multiple times (using an EventBridge rule)? The curious thing is that it doesn't always happen; sometimes the same type of event only executes the Lambda once. Here is the EventBridge rule:

{ "source": ["aws.ecs"], "detail-type": ["AWS API Call via CloudTrail"], "detail": { "eventSource": ["ecs.amazonaws.com"], "eventName": ["SubmitTaskStateChange"], "requestParameters": { "cluster": [{ "prefix": "XYZ" }], "status": ["PENDING"] } } }

Thank you!

1 Answer
0
Accepted Answer

Hello.

I think this is normal behavior since EventBridge may occasionally be executed multiple times.
https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-troubleshooting.html#eb-rule-triggered-more-than-once

In rare cases, the same rule can run more than once for a single event or scheduled time, or the same target can be invoked more than once for a given triggered rule.

You can tell if the same event is being called by looking at the ID contained in the event.
If this ID matches, you can determine that it is the same rule.

EXPERT
answered 9 months ago
EXPERT
reviewed 9 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.