Amazon SES Integration

Amazon Simple Email Service (Amazon SES) is a cost-effective email service built on the reliable and scalable infrastructure that Amazon.com developed to serve its own customer base.

OpsGenie is an alert and notification management solution that is highly complementary to Amazon SES. With this integration, OpsGenie alerts can be created for Amazon SES Bounce and Complaint notifications.

What does OpsGenie offer to Amazon SES users?

By using OpsGenie Amazon SES Integration, you can forward Amazon SES Bounce and Complaint notifications to OpsGenie. OpsGenie can determine the right people to notify based on on-call schedules, using email, text messages (SMS), phone calls and iOS & Android push notifications, and escalating alerts until the alert is acknowledged or closed.


Functionality of the integration

  • When Amazon SES receives a bounce or complaint message, an alert is created in OpsGenie automatically through the integration.

Add Amazon SES Integration to OpsGenie

  1. Please create an OpsGenie account if you haven't done already
  2. Go to OpsGenie Amazon SES Integration page,
  3. Specify who should be notified for Amazon SES alerts using the "Teams" field. Auto-complete suggestions will be provided as you type.
  4. Click on "Save Integration".

Configuration in Amazon SES

  1. Create an SNS topic.

  2. Add an HTTPS subscription to your topic with the OpsGenie API endpoint by using the URL provided from OpsGenie Integration.

    Upon successfully configuring SNS subscription to OpsGenie a confirmation alert should be created in OpsGenie.

  3. Configure Amazon SNS notifications for Amazon SES to send notifications to the SNS topic you've created.
  4. From the Notifications page, select Edit Configuration.
  5. In Edit Notification Configuration page, set SNS Topic you have created before to the Bounces and Complaints and click Save Config.

Sample Webhook Bounce Message from OpsGenie Amazon SES Plugin

{
  "Type" : "Notification",
  "MessageId" : "***********",
  "TopicArn" : "arn:aws:sns:eu-west-1:********:bounce-complaint-topic",
  "Message" : "{\"notificationType\":\"Bounce\",\"bounce\":{\"bounceSubType\":\"General\",\"bounceType\":\"Transient\",\"reportingMTA\":\"dsn; a27-35.smtp-out.us-west-2.amazonses.com\",\"bouncedRecipients\":[{\"action\":\"failed\",\"emailAddress\":\"ubuntu@fc-denver-nag0.fivecubits.com\",\"status\":\"4.4.7\",\"diagnosticCode\":\"smtp; 554 4.4.7 Message expired: unable to deliver in 840 minutes.<421 4.4.0 Unable to lookup DNS for fc-denver-nag0.fivecubits.com>\"}],\"timestamp\":\"2016-12-13T21:21:19.157Z\",\"feedbackId\":\"01010158fa0fa4d3-b86e77b8-aa1a-4bb3-8006-5cfa0ea6c403-000000\"},\"mail\":{\"timestamp\":\"2016-12-13T07:20:02.000Z\",\"sourceArn\":\"arn:aws:ses:us-west-2:539096099692:identity/fivecubits.com\",\"source\":\"ubuntu@fc-denver-nag0.fivecubits.com\",\"messageId\":\"01010158f70d6e44-200bab38-882b-45d8-b9ca-c193b714c048-000000\",\"destination\":[\"ubuntu@fc-denver-nag0.fivecubits.com\"],\"sendingAccountId\":\"********\"}}",
  "Timestamp" : "2015-08-12T07:58:38.175Z",
  "SignatureVersion" : "1",
  "Signature" : "*****************",
  "SigningCertURL" : "https://sns.eu-west-1.amazonaws.com/SimpleNotificationService-d6d679a1d18e95c2f9ffcf11f4f9e198.pem",
  "UnsubscribeURL" : "https://sns.eu-west-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:eu-west-1:********:bounce-complaint-topic:*****"
}

This payload is parsed by OpsGenie as:

[
"notificationType": "Bounce",
"bounceType": "Transient",
"bounceSubType": "General",
"bouncedRecipients":
    "emailAddress": "ubuntu@fc-denver-nag0.fivecubits.com",
    "action": "failed",
    "status": "4.4.7",
    "diagnosticCode": "smtp; 554 4.4.7 Message expired: unable to deliver in 840 minutes.<421 4.4.0 Unable to lookup DNS for fc-denver-nag0.fivecubits.com>",
"BouncedTimestamp": "2016-12-13T21:21:19.157Z",
"reportingMTA": "dsn; a27-35.smtp-out.us-west-2.amazonses.com",
"mailTimestamp": "2016-12-13T07:20:02.000Z",
"mailSource": "ubuntu@fc-denver-nag0.fivecubits.com",
"sourceArn": "arn:aws:ses:us-west-2:539096099692:identity/fivecubits.com",
"mailDestination": "ubuntu@fc-denver-nag0.fivecubits.com"
]

Sample Webhook Complaint Message from OpsGenie Amazon SES Plugin

{
  "Type" : "Notification",
  "MessageId" : "***********",
  "TopicArn" : "arn:aws:sns:eu-west-1:********:bounce-complaint-topic",
  "Message" : "{\"notificationType\":\"Complaint\",\"complaint\":{\"complainedRecipients\":[{\"emailAddress\":\"recipient1@example.com\"}],\"complaintFeedbackType\":\"abuse\",\"arrivalDate\":\"2009-12-03T04:24:21.000-05:00\",\"userAgent\":\"AnyCompany Feedback Loop (V0.01)\",\"timestamp\":\"2012-05-25T14:59:38.623Z\",\"feedbackId\":\"000001378603177f-18c07c78-fa81-4a58-9dd1-fedc3cb8f49a-000000\"},\"mail\":{\"timestamp\":\"2016-12-13T07:20:02.000Z\",\"sendingAccountId\":\"539096099692\",\"source\":\"ubuntu@fc-denver-nag0.fivecubits.com\",\"messageId\":\"01010158f70d6e44-200bab38-882b-45d8-b9ca-c193b714c048-000000\",\"destination\":[\"ubuntu@fc-denver-nag0.fivecubits.com\"],\"sourceArn\":\"arn:aws:ses:us-west-2:539096099692:identity/fivecubits.com\"}}",
  "Timestamp" : "2015-08-12T07:58:40.545Z",
  "SignatureVersion" : "1",
  "Signature" : "****************",
  "SigningCertURL" : "https://sns.eu-west-1.amazonaws.com/SimpleNotificationService-*******.pem",
  "UnsubscribeURL" : "https://sns.eu-west-1.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:eu-west-1:********:bounce-complaint-topic:****"
}

This payload is parsed by OpsGenie as:

[
"notificationType": "Complaint",
"userAgent":"AnyCompany Feedback Loop (V0.01)",
"complainedRecipients":
    "emailAddress":"recipient1@example.com"
"complaintFeedbackType":"abuse",
"arrivalDate":"2009-12-03T04:24:21.000-05:00",
"complaintTimestamp":"2012-05-25T14:59:38.623Z",
"mailTimestamp": "2016-12-13T07:20:02.000Z",
"mailSource": "ubuntu@fc-denver-nag0.fivecubits.com",
"sourceArn": "arn:aws:ses:us-west-2:539096099692:identity/fivecubits.com",
"mailDestination":
  "ubuntu@fc-denver-nag0.fivecubits.com"
]

Sample Bounce Alert

Sample Complaint Alert