AWS
CloudWatch
CloudWatch Alarm
CloudWatch Event
AWS Monitoring

What is the difference between a CloudWatch Alarm and a CloudWatch Event?

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

Introduction

CloudWatch Alarms and CloudWatch Events solve different problems even though their names are often mentioned together. An alarm evaluates metrics and changes state when a threshold is crossed. A CloudWatch Event, now part of Amazon EventBridge, routes discrete events to targets when they match a rule.

CloudWatch Alarm: Metric Evaluation Over Time

A CloudWatch Alarm watches a metric over one or more evaluation periods and compares it to a threshold. Its output is a state: OK, ALARM, or INSUFFICIENT_DATA.

That makes alarms a monitoring primitive. They answer questions like:

  • has CPU usage stayed above eighty percent for five minutes
  • is the queue depth too high
  • did the error count spike beyond the allowed threshold

A simple Terraform-like idea in AWS terms is: metric plus threshold plus action.

Typical actions include:

  • sending an SNS notification
  • triggering Auto Scaling behavior
  • creating an operational signal for on-call workflows

The important thing is that alarms are stateful. They remember whether the metric is currently healthy or unhealthy.

CloudWatch Events and EventBridge: Event Routing

CloudWatch Events evolved into Amazon EventBridge. This system is not about threshold evaluation over time. It is about routing events that occur.

An event might be:

  • an EC2 instance changing state
  • a scheduled time-based trigger
  • a deployment event from another AWS service
  • a custom application event placed on an event bus

An EventBridge rule matches the event pattern and sends the event to a target such as Lambda, Step Functions, SQS, or another bus.

This makes EventBridge an event-routing primitive rather than a metric-monitoring primitive.

A Concrete Comparison

Suppose you want to know when an EC2 instance has high CPU for a sustained period. That is an alarm.

Suppose you want to react whenever an EC2 instance enters the stopped state. That is an event rule.

Those are different signals:

  • the alarm is computed from metric data over time
  • the event is emitted because something happened in the system

One is threshold-based state monitoring. The other is event-driven integration.

Example of Each Pattern

A CloudWatch alarm example conceptually looks like this in Python with boto3:

python
1import boto3
2
3cloudwatch = boto3.client("cloudwatch")
4
5cloudwatch.put_metric_alarm(
6    AlarmName="high-cpu",
7    MetricName="CPUUtilization",
8    Namespace="AWS/EC2",
9    Statistic="Average",
10    Period=300,
11    EvaluationPeriods=1,
12    Threshold=80.0,
13    ComparisonOperator="GreaterThanThreshold",
14    Dimensions=[{"Name": "InstanceId", "Value": "i-1234567890abcdef0"}],
15)

An EventBridge rule example looks different because it matches event structure rather than metric thresholds.

python
1import boto3
2import json
3
4events = boto3.client("events")
5
6events.put_rule(
7    Name="ec2-stopped-rule",
8    EventPattern=json.dumps({
9        "source": ["aws.ec2"],
10        "detail-type": ["EC2 Instance State-change Notification"],
11        "detail": {"state": ["stopped"]},
12    }),
13    State="ENABLED",
14)

The APIs tell the story clearly. The alarm declares a metric threshold. The event rule declares a pattern.

How They Work Together

These services are not competitors. They often complement each other.

For example, an alarm state change itself can emit an event that EventBridge can route. That lets you build workflows where a metric threshold changes alarm state, and that state change then triggers downstream automation.

So the chain can be:

  1. a metric breaches a threshold
  2. the alarm enters ALARM
  3. the alarm state change becomes an event
  4. EventBridge routes it to a workflow

That is a useful mental model: alarms detect metric conditions, EventBridge distributes event notifications.

Common Pitfalls

The most common mistake is using alarms for things that are already emitted as events. If the signal is naturally an event, EventBridge is usually the simpler fit.

Another common problem is expecting EventBridge rules to perform metric evaluation over several minutes. That is not what event routing is designed to do.

Developers also sometimes forget the terminology shift. “CloudWatch Events” is the older name; the modern service for general event routing is Amazon EventBridge.

Finally, do not assume an alarm and an event rule are interchangeable because both can trigger automation. They are triggered by different kinds of inputs and should be designed accordingly.

Summary

  • A CloudWatch Alarm evaluates metric data over time and changes state when thresholds are crossed.
  • A CloudWatch Event, now handled through EventBridge, routes discrete events to targets when rules match.
  • Use alarms for metric-based monitoring and EventBridge for event-driven workflows.
  • Alarms are stateful; event rules are pattern-based routers.
  • The two services often work well together, especially when alarm state changes feed downstream automation.

Related reading
Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
Track what you have practised

A free account saves your progress, solutions and study plan across every problem on Codemia.

System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design

All Rights Reserved.