1. Enable Anomaly Detection

In this step you will enable anomaly detection for the CanaryResponseTime metric from CloudWatch. CloudWatch can apply statistical and machine learning algorithms that continuously analyze metrics of systems and applications to generate an anomaly detection model. This model generates a range of expected values that represent normal metric behavior & we can trigger CloudWatch Alarms based on alarming metric behavior. Let’s observe the latency graph for our traffic served from the N.Virgina region.

  1. Log into your AWS management console & ensure that you are in the N.Virginia region (Top right on the AWS menu bar).
  2. Select the Services dropdown at the very top of the AWS management console and type CloudWatch. Select CloudWatch from the filtered results to navigate to the CloudWatch service console
  3. Select Metrics
    • Under the All metrics tab, click on the Custom Namespaces dropdown, and select the Website Metric
    • Select Region
    • Select us-east-1 to view the metric graph representing latency for your application, approx. 2ms (Reference Image Below)

Latency

  1. Click the Graphed metrics tab
    • In the row labeled, CanaryResponseTime, navigate to the Period column and set its value to 10 Seconds
    • In the same row, navigate to Actions column, and enable anomaly detection by selecting the first icon in shape of a triangular waveform (Reference image below) AnomalyDiagram

At this point a new row labeled, CanaryResponseTime (expected) should show up in the console. This row is the new anomaly detection model that is generated for the CanaryResponseTime metric (Reference Image Below) AnomalyModel