• Products
  • Get started
  • Documentation
  • Resources

Integrate Opsgenie with Amazon CloudWatch Events

When resources change state they automatically send Amazon CloudWatch events into an event stream. Create rules that match selected events in the stream and route them to targets to take action. Use rules to also take action on a pre-determined schedule.

What does Opsgenie offer to Amazon CloudWatch Events users?

Use Opsgenie’s Amazon CloudWatch Events Integration to forward Amazon CloudWatch Events notifications to Opsgenie. Opsgenie determines the right people to notify based on on-call schedules– notifies via email, text messages (SMS), phone calls and iOS & Android push notifications, and escalates alerts until the alert is acknowledged or closed.

Functionality of the integration

When a state changes in your AWS resources, an alert is created in Opsgenie automatically through the integration.

Add Amazon CloudWatch Events Integration to Opsgenie

  1. Go to Settings → Integrations. Search for Amazon CloudWatch Events and select Add

Under the Free and Essentials plans, the tabs under the Team dashboard are limited to Main, Integrations, Members, and Activity Stream.

2. Specify who is notified of Amazon CloudWatch Events alerts using the Responders field. Auto-complete suggestions are provided as you type.

Did you know that you can also add this integration from your team dashboard? 

If you want your team to be the owner of this integration, add it from your team dashboard. Opsgenie will assign the alerts received through this integration to your team only.

To do that:

  1. Go to Teams,

  2. Find your team and select it to go to your team dashboard,

  3. From your team navigation, select Integrations,

  4. Select Add integration.

3. Copy the API Key.

4. Click Save Integration.

CloudWatch Events integration

Configuration in Amazon CloudWatch Events

  1. Go to the SNS dashboard. From the dashboard click Create Topic.

CloudWatch Events SNS dashboard

2. Fill in the required fields and click Create topic.

CloudWatch Events create topic

3. From Topic details page, click Create subscription.

CloudWatch Events topic details

4. Choose HTTPS for the "Protocol" field and paste the URL from the Opsgenie Amazon CloudWatch Events integration page to the Endpoint field. Then click Create subscription.

CloudWatch Events create subscription

Upon successfully configuring SNS subscription to Opsgenie, a confirmation alert is created in Opsgenie.

ClooudWatch Events confirmation alert

5. Go to the CloudWatch dashboard. From the left side menu click on Rules under Events.

CloudWatch dashboard

6. On the opening page click Create rule.

CloudWatch dashboard rules

7. Choose the Event Source to get notifications from. Then add the SNS topic previously created as the target. Then click Configure details.

CloudWatch event target

8. Populate the "Name" field and click Create rule.

CloudWatch event configure rule

Sample Payload from Opsgenie Amazon CloudWatch Events Integration


1 2 3 4 5 6 7 8 9 10 11 { "Type": "Notification", "MessageId": "96d4c7c2-999e-57ab-aade-95f2f518987f", "TopicArn": "arn:aws:sns:us-west-2:450xxxxxxx:test", "Message": "{\"version\":\"0\",\"id\":\"3ee38987-e0ce-29f1-91a1-32704265286f\",\"detail-type\":\"EC2 Instance State-change Notification\",\"source\":\"aws.ec2\",\"account\":\"4500xxxxxx\",\"time\":\"2017-09-11T10:49:41Z\",\"region\":\"us-west-2\",\"resources\":[\"arn:aws:ec2:us-west-2:4500xxxxxxx:instance/i-04d6ebefdb7xxxx\"],\"detail\":{\"instance-id\":\"i-04xxxxxx\",\"state\":\"terminated\"}}", "Timestamp": "2017-09-11T10:49:42.630Z", "SignatureVersion": "1", "Signature": "Iv8exxxx/DIfFd0eZ4eyo4vjrb/wEEoNji9S3xGQtpo1E9gXyMM8spmrULq20o25+OKXwZd5tRue7D69olvdcUdqRAN/bBfaHHq6tKVxnVnidgNq1VknAMeQRgd8qwVW1gARXTdO2z9AeDrOCH/ozEgNK3vwoFsDDxwKFxlFa9aioxxOu0uGlyuUpIb2rOaOwSo0aloE14XY9tgWrGlAxp+YwyHJbwXj36oAAU0GZOZV5C4TMhnRIdBnI9Yxxxxxxxx/tj6+gRnP4KeldOFHpaBGdw3/hOMdq9vA8yH934sA==", "SigningCertURL": "https://sns.us-west-2.amazonaws.com/SimpleNotificationService-433026a4050d2xxxxxxxxxx.pem", "UnsubscribeURL": "https://sns.us-west-2.amazonaws.com/?Action=Unsubscribe&SubscriptionArn=arn:aws:sns:us-west-2:4500xxxxxxx:test:5c91fe30-xxxxx-4627-a7f7-xxxxxxx" }

This payload is parsed by Opsgenie as:


1 2 3 4 5 6 7 8 9 { "id":"5c1f7731-23e0-0e90-124f-38ddb2811b49", "detail-type":"EC2 Instance State-change Notification", "source":"aws.ec2", "account":"4500xxxxxxx", "time":"2017-09-11T10:03:33Z", "region":"us-west-2", "detail":{"instance-id":"i-04d6ebxxxxxxxxx","state":"stopping"}}" }

Additional Help