Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

What is the difference between a CloudWatch Alarm and a CloudWatch Event? For me both seem to respond on a certain metric and trigger something on their target? What are important differences?

like image 408
DenCowboy Avatar asked Oct 02 '19 16:10

DenCowboy


People also ask

What is CloudWatch event?

Amazon CloudWatch Events delivers a near real-time stream of system events that describe changes in Amazon Web Services (AWS) resources. Using simple rules that you can quickly set up, you can match events and route them to one or more target functions or streams.

What are CloudWatch alarms?

The new CloudWatch Alarms feature allows you to watch CloudWatch metrics and to receive notifications when the metrics fall outside of the levels (high or low thresholds) that you configure. You can attach multiple Alarms to each metric and each one can have multiple actions.

What is the difference between CloudWatch logs and CloudWatch metrics?

While logs are about a specific event, metrics are a measurement at a point in time for the system.

What is the difference between CloudWatch and EventBridge?

CloudWatch Events provides a default event bus that exists in every AWS account. All AWS events are routed via the default bus. You can also choose to publish your custom events to the default bus. EventBridge introduces custom event buses you can use exclusively for your own workloads.


1 Answers

Some key differences:

  • Events can self-trigger based on a schedule; alarms don't do this
  • Alarms invoke actions only for sustained changes
  • Alarms watch a single metric and respond to changes in that metric; events can respond to actions (such as a lambda being created or some other change in your AWS environment)
  • Alarms can be added to CloudWatch dashboards, but events cannot
  • Events are processed by targets, with many more options than the actions an alarm can trigger

Event:

Amazon CloudWatch Events delivers a near real-time stream of system events that describe changes in Amazon Web Services (AWS) resources. Using simple rules that you can quickly set up, you can match events and route them to one or more target functions or streams. CloudWatch Events becomes aware of operational changes as they occur. CloudWatch Events responds to these operational changes and takes corrective action as necessary, by sending messages to respond to the environment, activating functions, making changes, and capturing state information.

You can also use CloudWatch Events to schedule automated actions that self-trigger at certain times using cron or rate expressions.

Alarm:

You can create a CloudWatch alarm that watches a single CloudWatch metric or the result of a math expression based on CloudWatch metrics. The alarm performs one or more actions based on the value of the metric or expression relative to a threshold over a number of time periods. The action can be an Amazon EC2 action, an Amazon EC2 Auto Scaling action, or a notification sent to an Amazon SNS topic.

Alarms invoke actions for sustained state changes only. CloudWatch alarms don't invoke actions simply because they are in a particular state, the state must have changed and been maintained for a specified number of periods.

References:

  • https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/WhatIsCloudWatchEvents.html
  • https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/AlarmThatSendsEmail.html
  • https://www.edureka.co/blog/amazon-cloudwatch-monitoring-tool/
like image 157
Shawn Avatar answered Oct 03 '22 11:10

Shawn