I'm trying to get the alert which the user fails to log in to the AWS console. I wrote the event bridge rule based on the cloud trail log. Raw Log
{
"eventVersion": "1.08",
"userIdentity": {
"type": "IAMUser",
"principalId": "XXXXXXXXXXXXX",
"accountId": "XXXXXXXXXXX",
"accessKeyId": "",
"userName": "XXXXXXXX"
},
"eventTime": "XXXXXXXXXXXXXXX",
"eventSource": "signin.amazonaws.com",
"eventName": "ConsoleLogin",
"awsRegion": "us-east-1",
"sourceIPAddress": "XXXXXXXXX",
"userAgent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36",
"errorMessage": "Failed authentication",
"requestParameters": null,
"responseElements": {
"ConsoleLogin": "Failure"
},
Here I want to take the Input as the ConsoleLogin": "Failure"
How to create a rule in Eventbridge.
EventBridge Rule.
{
"detail-type": [
"AWS Console Sign In via CloudTrail"
],
"detail": {
"eventSource": [
"signin.amazonaws.com"
],
"eventName": [
"ConsoleLogin"
],
"type": [
"Root",
"AssumedRole",
"IAMUser"
],
"responseElements": {
"ConsoleLogin": [
"Failure"
]
}
}
}
Is this the Right rule.