Hi!
Our current flow for some of our AWS alerts is Eventbridge Rule -> SNS -> OpsGenie. Through AWS EventBridge Rule, we can only access the 'Message' field in SNS. When we populate the 'Message' field with a JSON object. See the example below.
{
"Type": "Notification",
"MessageId": "XXX",
"TopicArn": "arn:aws:sns:eu-central-1:XXX:test_topic_opsgenie",
"Message": "{\n \"eventId\":\"XXX |\",\n \"region\": \"us-east-1 |\",\n \"time\": \"2022-12-12T13:29:18Z |\",\n \"userIdentityArn\": \"arn:aws:sts::XXX:assumed-role/XXX |\",\n \"eventName\": \"XXX |\",\n \"account\": \"XXX |\",\n \"title\": \"XXX |\",\n \"description\": \"The ChangeResourceRecordSets API call was made by the user arn:aws:sts::XXX:assumed-role/XXX/XXX@XXX in account: #XXX, in region: us-east-1 |\",\n \"ops_severity\": \"1 |\",\n \"ops_source\": \"XXX |\",\n \"alias\": \"XXXX |\"\n}",
"Timestamp": "2022-12-12T13:29:20.931Z",
"SignatureVersion": "1",
"Signature": "XXX",
"SigningCertURL": "https://sns.eu-central-1.amazonaws.com/SimpleNotificationService-XXX.pem",
"UnsubscribeURL": "https://sns.eu-central-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:eu-central-1:XXX:test_topic_opsgenie:XXX"
}
Hi @Mike Schouw ,
Unless the region or account fields are nested under the Message field, you will need to use string processing or regex to extract the strings from within the Message field.
This article may help with extracting fields: How to Extract Custom Fields and Data into an Alert
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.