I am trying to find a way to somehow capture events that do not match a specific rule from an event bus. Below is the event-pattern for a rule that I created:
{
"detail": {
"key1": ["1234"],
"key2": ["ABC"],
"key3": ["PHL"]
}
}
The rule is matched and the target is invoked only if all 3 keys in the pattern are matching.
How do I log or find out the event that was unmatched by this rule and the target wasn't invoked?
Solutions I tried but failed:
Like what Marcin said ... Its possible to write a Lambda as target with a rule that matches all/most of the events in your EB. The Lambda function will
ListRules for all events in your custom EBTestEventPatternNot a pretty soln I admit ...
See:
https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_ListRules.html https://docs.aws.amazon.com/eventbridge/latest/APIReference/API_TestEventPattern.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With