2. Create CloudWatch Alarm

In this step, we will create a new CloudWatch Alarm that will raise an alarm based on the anomaly detection model predictions. We will set its target to a pre-created SNS topic that is subscribed to a Lambda Function explained in next step. Let’s continue from where we left off:

  1. In the CanaryResponseTime row, navigate to Actions column and click the bell icon to create a CloudWatch Alarm
  2. In new alarm page, scroll down to the Conditions section

    • Select Anomaly detection
    • Select Greater than the band
    • Expand Additional Configuration
    • Modify Datapoints to alarm value to 2 of 2
    • Select Next
  3. Under Notification

    • Click on the Send a notification to… dropdown
    • Select the xxxx-CWAlarmTopic-xxxxxxxxxxx SNS topic
    • Select Next
  4. For Alarm name use AnomalyAlarm

  5. (Optional) Provide a description for this alarm.

  6. Click Next

  7. Scroll to the bottom of the next page, and Click Create alarm