AWS Builder Center
AWS CloudOps Learning Journey | Skill 1.1.3 – Configure and Manage CloudWatch Alarms, Composite Alarms & EventBridge

AWS CloudOps Learning Journey | Skill 1.1.3 – Configure and Manage CloudWatch Alarms, Composite Alarms & EventBridge

Move beyond collecting metrics to detecting infrastructure issues and triggering automated responses. Learn how to configure CloudWatch Alarms, combine conditions using Composite Alarms, and route events through EventBridge with hands-on demos and troubleshooting.

Series: My CloudOps Learning Journey (7 articles)

  1. …
  2. 4
    AWS CloudOps Learning Journey | Skill 1.1.3 – Configure and Manage CloudWatch Alarms, Composite Alarms & EventBridge This article
In the previous article, I explored how to configure and manage the CloudWatch Agent to collect system-level metrics and logs from an EC2 instance.
I learned how to monitor memory utilization, collect log files, verify incoming data, and troubleshoot missing metrics.
But collecting monitoring data is only one part of the job.
What happens when something goes wrong? How does the operations team know? And how can AWS respond to that problem?
In this article, I'll explore how CloudWatch Alarms detect problems, Composite Alarms combine multiple conditions, and Amazon EventBridge routes events to other AWS services.
Let's continue with a practical CloudOps scenario.



1. Why do we need CloudWatch Alarms?

Imagine an application running on an EC2 instance.
CloudWatch collects CPU utilization, and the CloudWatch Agent collects memory utilization.
Now consider this situation:
  • CPU utilization suddenly increases.
  • Memory utilization also starts increasing.
  • The application becomes slow.
  • Users begin experiencing delays.
As a CloudOps engineer, continuously checking graphs isn't a practical solution.
We need a mechanism that automatically evaluates metrics and alerts us when predefined conditions are met.
That's the purpose of CloudWatch Alarms.

2. CloudWatch Metric Alarm – Detect abnormal conditions

A CloudWatch Metric Alarm monitors a metric and compares it against a configured threshold.
For example, let's create an alarm when EC2 CPU utilization remains above 70%.
Configuration
Example
Metric
CPUUtilization
Condition
Greater than 70%
Period
1 minute
Evaluation periods
5
Datapoints to alarm
3
These are example lab settings. The actual configuration depends on the workload.

Understand the three alarm states

State
Meaning
OK
Metric condition is within the acceptable range
ALARM
Configured alarm condition has been breached
INSUFFICIENT_DATA
Not enough data is available to evaluate the alarm
Example:
  1. CPU utilization is 35% → OK.
  1. CPU utilization crosses the threshold and satisfies the evaluation criteria → ALARM.
  1. CPU utilization returns to normal and satisfies the recovery criteria → OK.
The important point is that an alarm evaluates data over configured periods. One unusual reading doesn't necessarily mean an alarm will immediately trigger.
CloudOps understanding: Metrics show what is happening. Alarms help us identify when something requires attention.

3. Composite Alarms – Combine multiple conditions

Now let's make the scenario more interesting.
Suppose CPU utilization is high. Is the application necessarily in trouble?
Not always.
But what if CPU and memory utilization are both high?
We can combine these conditions using a CloudWatch Composite Alarm.
A Composite Alarm monitors the states of other CloudWatch alarms and evaluates them using Boolean logic.
For our example, we create:
  • CPU Alarm – CPU utilization is high.
  • Memory Alarm – Memory utilization is high.
  • Composite Alarm – Checks whether both alarms are in ALARM state.
Example expression:
ALARM(CPUAlarm) AND ALARM(MemoryAlarm)
The Composite Alarm becomes ALARM only when both conditions are satisfied.

Four operators/functions you should understand

1. AND – All conditions must be TRUE
Use this when multiple conditions must occur together.
Example: CPU is high AND memory is high.
ALARM(CPUAlarm) AND ALARM(MemoryAlarm)
2. OR – At least one condition must be TRUE
Use this when any one of several problems should trigger the composite alarm.
Example: CPU is high OR memory is high.
ALARM(CPUAlarm) OR ALARM(MemoryAlarm)
3. NOT – The specified condition must be FALSE
Use this to exclude a particular condition.
Example: CPU is high, but a deployment is not in progress.
ALARM(CPUAlarm) AND NOT ALARM(DeploymentAlarm)
4. AT_LEAST – A minimum number of conditions must be TRUE
Use this when monitoring multiple servers and you want an alert only when a minimum number are affected.
Example: At least 2 out of 4 servers have high CPU utilization.
AT_LEAST(2, ALARM, (Server1CPU, Server2CPU, Server3CPU, Server4CPU))
Remember:
Operator
When to use
AND
All specified conditions must match
OR
Any one condition can match
NOT
Exclude a specified condition
AT_LEAST
Require a minimum number or percentage of alarms to match
These operators help create meaningful alert conditions and reduce unnecessary notifications.

4. Amazon EventBridge – Route events for action

We have detected a problem and combined the relevant alarm conditions.
But how do we trigger another AWS service when an alarm changes state?
This is where Amazon EventBridge comes in.
CloudWatch sends alarm state-change events to EventBridge. We can create a rule to match those events and route them to a configured target.

Understand the workflow

Imagine both CPU and memory alarms become ALARM.
  1. CloudWatch evaluates the individual metric alarms.
  1. The Composite Alarm detects that both conditions are satisfied.
  1. The Composite Alarm changes to ALARM.
  1. CloudWatch sends an alarm state-change event to EventBridge.
  1. EventBridge matches the event against our rule.
  1. EventBridge invokes a configured target, such as AWS Lambda.
For example, a Lambda function could create an incident record or execute a controlled operational task.
An example EventBridge event pattern:
{
"source": ["aws.cloudwatch"],
"detail-type": ["CloudWatch Alarm State Change"]
}
You can further filter events by alarm name or state.

Understand the difference

Service
Responsibility
CloudWatch Metric Alarm
Detects metric conditions
CloudWatch Composite Alarm
Combines alarm states
Amazon EventBridge
Matches and routes events
AWS Lambda
Executes custom code
One important distinction: EventBridge is not required for every alarm notification. CloudWatch alarms can also have their own configured actions, such as SNS notifications or Lambda invocation.



5. Hands-on Demonstration – Build an alerting workflow

Now let's implement the scenario.

Demo 1 – Create a CPU Alarm

  1. Open the CloudWatch console.
  1. Navigate to Alarms → All alarms.
  1. Select Create alarm.
  1. Choose Select metric.
  1. Navigate to EC2 → Per-Instance Metrics.
  1. Select CPUUtilization for your test instance.
  1. Configure the threshold, for example, greater than 70%.
  1. Configure the evaluation periods and datapoints to alarm.
  1. Configure an alarm action if required.
  1. Create the alarm.

Demo 2 – Generate CPU activity

  1. Connect to your EC2 instance.
  1. Generate controlled CPU activity.
  1. Open CloudWatch and observe the CPU metric.
  1. Wait for the alarm evaluation.
  1. Verify the transition from OK to ALARM.
  1. Stop the CPU activity.
  1. Verify that the alarm returns to OK after recovery.

Demo 3 – Create a Memory Alarm

Remember our previous article on the CloudWatch Agent?
We'll reuse that configuration here.
  1. Ensure the CloudWatch Agent is installed and running.
  1. Confirm that memory utilization is being published.
  1. Open CloudWatch → Metrics → All metrics.
  1. Select the CWAgent namespace.
  1. Locate the memory utilization metric.
  1. Create a Memory Alarm using that metric.
This demonstrates how the CloudWatch Agent configuration from the previous article can support alarm creation.

Demo 4 – Create a Composite Alarm

  1. Open CloudWatch → Alarms → All alarms.
  1. Select the CPU and Memory alarms.
  1. Choose Create composite alarm.
  1. Configure the rule expression:
ALARM(CPUAlarm) AND ALARM(MemoryAlarm)
  1. Configure the required composite alarm action.
  1. Create the alarm.
Test the conditions:
CPU Alarm
Memory Alarm
Composite Alarm
OK
OK
OK
ALARM
OK
OK
OK
ALARM
OK
ALARM
ALARM
ALARM
For this lab, keep individual alarm notifications disabled if you want to test a single combined notification at the composite level.

Demo 5 – Create an EventBridge Rule

  1. Open Amazon EventBridge.
  1. Navigate to Rules → Create rule.
  1. Enter a rule name.
  1. Select the appropriate event bus.
  1. Choose Rule with an event pattern.
  1. Select AWS services as the event source.
  1. Choose CloudWatch as the service.
  1. Select CloudWatch Alarm State Change as the event type.
  1. Configure a target, such as a Lambda function.
  1. Ensure EventBridge has permission to invoke the target.
  1. Create the rule.
Trigger the alarm and verify whether the matching event reaches the configured target.
Expected workflow:
EC2 Metrics
|
v
CPU Alarm + Memory Alarm
|
v
Composite Alarm
|
v
CloudWatch State Change Event
|
v
Amazon EventBridge
|
v
AWS Lambda



6. Troubleshooting – When alerts don't work

A CloudOps engineer must understand not only how to create alarms but also how to investigate failures.
Problem
What to check
Possible solution
Alarm shows INSUFFICIENT_DATA
Metric data, namespace, dimensions, Region and period
Verify that the correct metric is publishing data
Alarm doesn't enter ALARM
Threshold and evaluation configuration
Verify datapoints and generate sufficient test activity
Composite Alarm remains OK
Underlying alarm states and rule expression
Check whether the required alarms are actually in ALARM
EventBridge target doesn't execute
Rule status, event pattern, target and permissions
Correct the event pattern and invocation permissions
Lambda doesn't execute successfully
Lambda permissions and function logs
Check invocation permissions and troubleshoot function errors

Practise controlled failures

Try these three situations separately:
Failure 1 – Alarm doesn't receive data
  • Check whether the selected metric exists.
  • Verify the correct Region and dimensions.
  • Check whether the instance is publishing data.
Failure 2 – Composite Alarm doesn't trigger
  • Check individual alarm states.
  • Verify the Boolean expression.
  • Confirm that the required combination of conditions is satisfied.
Failure 3 – EventBridge target doesn't execute
  • Check whether the rule is enabled.
  • Verify the event pattern.
  • Check target configuration and permissions.
  • Inspect the target service's logs or execution history.
Don't randomly change configurations. Identify the failing layer first, fix it, and verify the result.

7. CloudOps Decision Notebook

Requirement
AWS service or feature
Detect a metric crossing a threshold
CloudWatch Metric Alarm
Combine multiple alarm states
CloudWatch Composite Alarm
Require all conditions
AND
Require any one condition
OR
Exclude a condition
NOT
Require a minimum number of alarms
AT_LEAST
Route alarm state-change events
Amazon EventBridge
Execute custom operational logic
AWS Lambda
Send notifications
Amazon SNS

Important exam distinctions

  • Metric alarms evaluate metrics.
  • Composite alarms evaluate other alarm states.
  • EventBridge matches events and routes them to targets.
  • Composite alarms can reduce unnecessary notifications.
  • Composite alarms support SNS, Lambda, and Systems Manager actions, among other supported options.
  • Composite alarms cannot directly perform EC2 stop, terminate, reboot, or Auto Scaling actions.
These distinctions are important when choosing the correct AWS service in scenario-based questions.

8. Cleanup – Avoid unnecessary charges

After completing the demonstration:
  • Stop the CPU stress process.
  • Delete the test metric alarms.
  • Delete the composite alarm.
  • Delete the EventBridge rule.
  • Delete the test Lambda function if it was created only for this exercise.
  • Remove unused test resources.
  • Check for any remaining resources that could incur charges.
Remember that custom metrics, log ingestion, and other AWS resources may have associated costs.



9. What have I learned?

After completing these demonstrations, I should be able to:
  • Create and configure CloudWatch Metric Alarms.
  • Understand OK, ALARM, and INSUFFICIENT_DATA states.
  • Combine multiple alarms using Composite Alarms.
  • Understand AND, OR, NOT, and AT_LEAST.
  • Route alarm state-change events using EventBridge.
  • Connect EventBridge to a Lambda target.
  • Troubleshoot missing metrics, alarm evaluation, and event delivery.
  • Verify recovery instead of assuming that a successful configuration means everything works.

The CloudOps mindset

Monitoring data is useful only when we can interpret it and respond appropriately.
A CloudOps engineer should know how to detect an issue, identify whether multiple conditions are related, and route the right event to the right destination.
Monitor → Detect → Combine → Route → Respond
That's how we move from simply observing infrastructure to managing its operational health.



Next in the series

Skill 1.1.4 – Configure and Manage CloudWatch Dashboards
In the next article, I'll explore how to bring important metrics and monitoring information together in a single dashboard, making it easier to understand the health of AWS workloads at a glance.
☁️ Learn • Practise • Troubleshoot • Fix • Verify • Grow

Series: My CloudOps Learning Journey (7 articles)

  1. …
  2. 4
    AWS CloudOps Learning Journey | Skill 1.1.3 – Configure and Manage CloudWatch Alarms, Composite Alarms & EventBridge This article
Any opinions in this article are those of the individual author and may not reflect the opinions of AWS.
Enjoyed reading this content? Let the author know!

Your likes, comments, shares, and saves help creators reach more builders.

Loading recommendations

Loading article