Day 47 β€” Amazon CloudWatch: Monitoring, Events, Logs, and Alerts

Today I learned about Amazon CloudWatch, one of the most powerful monitoring tools in AWS. It helps keep an eye on application performance, logs, infrastructure health, and more β€” all in real-time.


πŸ‘€ What is Amazon CloudWatch?

Amazon CloudWatch is a monitoring and observability service built for DevOps engineers, developers, site reliability engineers (SREs), and IT managers.

It provides data and actionable insights to monitor your applications, understand system-wide performance changes, and optimize resource utilization.


πŸ“Š CloudWatch Metrics

CloudWatch collects and tracks metrics β€” data points for AWS services and resources, such as:

  • EC2 instances (CPU, disk I/O, network usage)

  • EBS volumes (read/write operations)

  • Elastic Load Balancers (healthy/unhealthy host counts)

  • RDS databases, S3 buckets, CloudFront, Lambda, and more

  • You can also push custom metrics from your own apps/scripts

πŸ“Œ These metrics are visualized in CloudWatch Dashboards.


🚨 CloudWatch Alarms

You can create Alarms to monitor metrics and automatically take actions like:

  • Send notifications via SNS (Simple Notification Service)

  • Auto-scale EC2 instances up or down

  • Reboot or stop an instance

πŸ”” Example:

If an EC2 instance’s CPU usage is over 80% for 5 minutes, trigger an alarm and send an alert via SNS.


πŸ” CloudWatch Events (Now part of EventBridge)

CloudWatch Events deliver real-time system notifications when AWS resources change state.

You can:

  • Trigger Lambda functions, SNS, or Step Functions when events occur

  • Track instance state changes, code deployments, health checks, etc.

Example:

Automatically stop an EC2 instance every day at 7 PM using a scheduled rule


πŸ“ CloudWatch Logs

You can stream and store logs from services like:

  • EC2 (via CloudWatch Agent)

  • AWS CloudTrail

  • Lambda logs

  • Route53 DNS logs

  • Custom applications (via log drivers)

Logs are searchable and retainable. You can also create metric filters from logs to trigger alarms.


πŸ”” What is Amazon SNS?

Amazon SNS (Simple Notification Service) is a fully managed pub/sub messaging service.

  • Used to send alerts, status updates, or event-based notifications

  • Supports email, SMS, Lambda, HTTP endpoints, etc.

  • Works hand-in-hand with CloudWatch Alarms to deliver updates


🧠 What I Learned Today

  • CloudWatch helps track metrics, logs, and system events in near real-time

  • Alarms are essential for automating responses to thresholds

  • Logs and events give deep insights into system health

  • SNS integrates perfectly for alerts and notifications

Up next: Diving into Amazon EFS

0
Subscribe to my newsletter

Read articles from Shaharyar Shakir directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Shaharyar Shakir
Shaharyar Shakir