shiichan

CloudWatch Can Now Build Alarms Straight From Log Queries!

Hey there, it's Shii-chan! Today I found a nice little update around monitoring, so let me walk you through it.

AWS What's New aws.amazon.com

What was announced?

Over on AWS What's New, Amazon CloudWatch announced that you can now create alarms straight from log queries. You can detect anomalies and get alerted without ever leaving your log analysis workflow.

The story so far

Until now, if you wanted to monitor what was inside your logs, you had to first create a metric filter or a custom metric, and then set an alarm on that metric - an extra intermediate step that was a bit of a hassle.

What changes

With this update, you can set a threshold directly on a log query and create an alarm from it. There's no need to build a metric filter or custom metric first, so going from "wait, are errors climbing?" to a configured alert is now a straight line.

For example, you can write a query to count error rates by service, set a threshold, and get a notification with log context when errors spike.

Dive Deep

Alarms created from log queries support all the standard CloudWatch alarm actions, including Amazon SNS notifications and Amazon EventBridge integrations. You can set them up from the CloudWatch console, the AWS CLI, AWS CloudFormation, and the AWS SDKs.

It's available in all commercial AWS Regions except Middle East (UAE) and Middle East (Bahrain). The documentation covers the setup details, and the pricing page has the cost info, so check those if you want the specifics.

Wrap-up

  • You can now create alarms directly from log queries by setting a threshold
  • No more intermediate metric filters or custom metrics
  • All standard alarm actions work, including Amazon SNS notifications and Amazon EventBridge integrations
  • Configurable via console, CLI, CloudFormation, and SDKs, in all commercial Regions except UAE and Bahrain

This one's a treat for ops engineers who want simpler log monitoring and anyone building out observability with CloudWatch!