- Newest
- Most votes
- Most comments
Based on the information provided, there are several potential reasons why your SAML2Response_POST events from Amazon Cognito aren't being detected by your event patterns.
Looking at the example SAML2Response_POST event you're trying to capture, I notice that the eventType is "AwsServiceEvent" and not an API call. This is a key distinction for how you should structure your event pattern.
For Amazon Cognito user pools events sent to EventBridge through CloudTrail, you need to use:
source: aws.cognito-idpeventSource: cognito-idp.amazonaws.com
However, the SAML2Response_POST event appears to be a service event rather than an API call. In your event pattern, you should try using:
{
"source": ["aws.cognito-idp"],
"detail-type": ["AWS Service Event via CloudTrail"],
"detail": {
"eventSource": ["cognito-idp.amazonaws.com"],
"eventName": ["SAML2Response_POST"]
}
}
Make sure there's a comma after "cognito-idp.amazonaws.com" in your JSON patterns - I noticed some of your examples were missing this comma which would make the JSON invalid.
Also, verify that:
- Your CloudTrail trail is properly configured to log these events
- The events are actually occurring during your testing period
- The CloudTrail trail is enabled in the region where your Cognito user pool is configured
- Your event rule is in the ENABLED state
- You've allowed sufficient time for the rule to become active after creation
If you're still having issues, you might want to temporarily create a broader pattern to capture all Cognito events and then analyze what's coming through to better understand the event structure.
Sources
Example Amazon Cognito events - Amazon Cognito
Why am I not receiving Cognito events in EventBridge? | AWS re:Post
Amazon Cognito user pools events - Amazon EventBridge
answered a year ago
Relevant content
asked a year ago

SAML2Response_POST events never reach EventBridge. They appear in CloudTrail S3 logs, but AWS does not forward Cognito IdP login/authentication data-plane events to the EventBridge bus. That’s why no event pattern works — the event isn’t delivered there at all.
If you need to react to these events, the supported patterns are: (1) Parse the CloudTrail S3 logs via Lambda, or (2) Use CloudTrail Lake with an Event Data Store and query/filter SAML events from there. EventBridge cannot receive these events because AWS does not route them to the bus.
Thanks Eric!
Do you know where the AWS documentation references this?