Search code examples
amazon-web-servicesamazon-cloudwatchcloudwatch-alarms

Cloudwatch alarm for a time range


I want to create an alarm for a particular time window. So, the use case is if we see customer/traffic drop from 6:00 AM to 10 PM then we should get an alarm to know why customers are not using our service and to take some action. is this scenario possible through cloudwatch alarm? we have the number of request metric in place.


Solution

  • Amazon CloudWatch cannot specify time ranges, but since you want to know whether something "unusual" is happening, I would recommend you look at Using CloudWatch Anomaly Detection - Amazon CloudWatch:

    When you enable anomaly detection for a metric, CloudWatch applies statistical and machine learning algorithms. These algorithms continuously analyze metrics of systems and applications, determine normal baselines, and surface anomalies with minimal user intervention.

    See: New – Amazon CloudWatch Anomaly Detection | AWS News Blog

    It should be able to notice if a metric goes outside of its "normal" range, and trigger an alarm.