Troubleshooting EventBridge Rules
This lesson explains how rule metrics show whether an EventBridge problem is a rule that does not match or a target that is not invoked, and how to fix each.
Learning outcomes
After completing this lesson, you will be able to:
- Use rule metrics to locate the problem.
- Fix rules that do not match.
- Fix targets that are not invoked.
Use the rule metrics first
EventBridge publishes metrics per rule in the AWS/Events namespace. MatchedEvents shows whether events matched. Invocations counts target invocations, FailedInvocations counts failures that were not retried successfully, ThrottledRules shows throttling, and InvocationsSentToDlq and InvocationsFailedToBeSentToDlq show dead-letter queue activity. If MatchedEvents is zero, the problem is the event or the pattern; if it is positive but FailedInvocations is too, the problem is the target.
The following diagram turns the two metrics into a decision.

When the rule does not match
Work through the following causes in order when MatchedEvents stays at zero.
- The event is not emitted where you think. Service events go to the default bus in the Region where they occur; API call events for global services such as IAM appear in us-east-1.
- The rule is on a custom bus, but AWS service events only arrive on the default bus.
- The pattern does not match the real event. Compare it with a sample from the console or use
aws events test-event-pattern. Check case, field names, nesting and that values are in arrays. - API call events need CloudTrail to record the call; read-only calls are only delivered to rules that opt in to them.
- S3 events reach EventBridge only if EventBridge notifications are enabled on the bucket.
- The rule is disabled.
Why no match?
When the target is not invoked
When events match but the target does nothing, the following checks cover most cases.
- The target's resource-based policy does not allow
events.amazonaws.com, or itsaws:SourceArncondition names a different rule. - The rule's IAM role lacks the action (for example
ssm:StartAutomationExecution) oriam:PassRole. - An SNS topic or SQS queue encrypted with a KMS key whose policy does not allow EventBridge.
- The input transformer produces invalid JSON or a payload the target rejects.
- The target is in another account and the destination bus policy does not allow the source account.
A dead-letter queue on the target captures failed events with the error code and message as message attributes, which usually names the exact cause.
Matched but not delivered
A pattern that never matches
An engineer writes a rule to alert on root user console sign-in, with the pattern {"source": ["aws.signin"], "detail": {"userIdentity": {"type": "Root"}}}, in eu-west-1. Nothing matches. There are two errors. The value "Root" is not in an array, which makes the pattern invalid or non-matching, and console sign-in events are delivered in the Region where the sign-in endpoint is called, which for most root sign-ins is us-east-1. The corrected rule uses "type": ["Root"] together with "detail-type": ["AWS Console Sign In via CloudTrail"] and is created in us-east-1 (and other Regions where sign-ins occur).
MatchedEvents is above zero, but FailedInvocations is also above zero. Where is the problem?
Show answer
In the target: its permissions or the payload. The pattern itself is matching.
Exam Tips
Remember for the exam
- MatchedEvents = 0: pattern, bus or Region problem. FailedInvocations > 0: target permissions or payload.
- Test patterns with test-event-pattern against a real sample event.
- AWS service events only arrive on the default bus.
- Global service events (IAM, sign-in) usually appear in us-east-1.
- A DLQ on the target records the error for failed events.