-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AssumeRoleWithSAML is not supported by CloudWatch Event Rules #1
Comments
"AssumeRoleWithSAML" is not currently supported by CloudWatch Events, but there is an existing feature request to add this functionality This work-around utilizes four services: To implement this, a CloudTrail needs to be created if there isn't an existing one that is capturing the event “AssumeRoleWithSAML”. Stream the trail to a CloudWatch log group. Next, go to the CloudWatch console and in the logs section you’ll find the Log group that is created by the CloudTrail. Click into it to ensure that API calls are being received (note that this can take a few minutes). Ensure that the event “AssumeRoleWithSAML” is being captured by filtering ( {$.eventName = "AssumeRoleWithSAML"}. Create the following lambda function and register it as the event target:
|
Any update on this case using cloudwatch event rules? |
I've not worked on this lately, but as far as I know this event is still not supported by CloudWatch Events. When you create a subscription filter as a workaround, your lambda function receives the event as a parameter. You should just extract the fields according to your needs, e.g UserName = event["userIdentity"]["userName"]. You don't need to fetch subscription filters yourself. This is the event handler in my implementation. AssumeRoleWithSaml test event - https://github.com/erhanux/aws-tags/blob/master/test/events/AssumeRoleWithSaml.json |
I have a CloudWatch event rule for the sts:AssumeRole*, but AssumeRoleWithSAML is never triggered.
The text was updated successfully, but these errors were encountered: