- Newest
- Most votes
- Most comments
Hello, there is no built-in silence feature in CloudWatch alarms. It is however possible to prevent the alarm from sending notifications, using one of the following approaches:
-
Disable the alarm actions during off-business hours using a lambda triggered by an eventbridge cron rule. Your alarm will still change state during off-business hours, but the notification will not be posted. You can call the lambda at 5pm to call https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_DisableAlarmActions.html, and trigger the lambda at 9am to call https://docs.aws.amazon.com/AmazonCloudWatch/latest/APIReference/API_EnableAlarmActions.html
-
Use metric math to silence the metric during off-business hours, for example create a metric math expression that would be equal to
IF(HOUR(m1) > 9 AND HOUR(m1) < 17, m1)
and alarm on that metric math expression. With that option, your alarm will never change state during off-business hours.
Relevant content
- asked 5 months ago
- asked 4 months ago
- How can I monitor daily EstimatedCharges and trigger a CloudWatch alarm based on my usage threshold?AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 3 months ago