Menu

AWS CloudWatch Alarms and SNS: Get Notified When Something Goes Wrong
📰

AWS CloudWatch Alarms and SNS: Get Notified When Something Goes Wrong

DEV Community: beginners·Robin Sishodia·about 8 hours ago
#QCTCINln
#devtobeginners#devto#dev#alarm#topic
Reading 0:00
15s threshold

In the last two posts I set up several accounts and a way for people to sign in. Now the question every real environment hits: when something goes wrong, who finds out, and how fast? The basic answer on AWS is a CloudWatch alarm that sends a message through Amazon SNS .

What each service does

Amazon CloudWatch collects metrics, such as CPU use or estimated charges, and can watch them with alarms.

CloudWatch alarm compares a metric to a threshold and moves between three states: OK , ALARM and INSUFFICIENT_DATA .

Amazon SNS (Simple Notification Service) sends a message to everyone subscribed to a topic , by email, SMS or other targets.

The building blocks

Term What it is Notes

Metric A number measured over time Example: CPUUtilization or EstimatedCharges

Alarm A rule on one metric Threshold, period and number of periods

SNS topic A channel for messages Alarms publish to it

Subscription Who receives the topic An email subscription must be confirmed

Alarm action What the alarm does on a state change…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.