- Newest
- Most votes
- Most comments
There are several potential reasons why your EventBridge rule isn't triggering for CloudTrail events. Here are the key issues to check and fix:
-
Rule State: Ensure your rule is in the "ENABLED" or "ENABLED_WITH_ALL_CLOUDTRAIL_MANAGEMENT_EVENTS" state. The latter is specifically required for AWS management events delivered through CloudTrail.
-
Region Consideration: For global AWS services like IAM and SSO, events are only available in the US East (N. Virginia) region (us-east-1) for EventBridge. Make sure your rule is created in us-east-1 if you're monitoring SSO events.
-
CloudTrail Integration: Verify that your CloudTrail trail is properly configured to send events to EventBridge. While you mentioned you have management events enabled, double-check that there are no filters excluding the specific events you're interested in.
-
Event Bus: Confirm that your rule is associated with the correct event bus. For AWS service events, you should be using the default event bus.
-
IAM Permissions: Ensure EventBridge has the necessary permissions to access the events and invoke your state machine target.
-
Event Pattern: Your event pattern looks correct, but verify that the exact format of the events coming from SSO matches what you're expecting. The source and detail-type fields are particularly important.
-
Delay: Allow some time for the changes to take effect, as there can sometimes be a slight delay before a rule becomes fully operational.
To troubleshoot further, you could set up CloudWatch metrics to monitor your rule by tracking "TriggeredRules" and "FailedInvocations" metrics, which would give you more insight into what's happening with your rule.
Sources
EventBridge rule not triggered | AWS re:Post
EventBridge rule not working | AWS re:Post
Rule - Amazon EventBridge
The second one looks correct to me. The DisableUser API is handled by the sso-directory endpoint, not sso. You probably don't need the detail.eventSource item in there as matching on the source should be enough. You mentioned you can see the event in CloudTrail, so you can compare against the event content there if needed.
Your first one is wrong because the source has the wrong value in it, so that won't match even though detail.eventSource would.
Check the little example at the end of https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event-cloudtrail-management.html
These are a few checks you could run:
- AWS services send events to EventBridge on the default bus.
- Is the trail in logging status?
- Are you using the region where you configured Identity Center?
answered a year ago
Relevant content
asked a year ago
asked 2 years ago
- AWS OFFICIALUpdated 8 months ago
