Monitor EC2 CPU Usage with AWS CloudWatch and Get Email Alerts via SNS

#aws #cloudwatch
Introduction
Monitoring your infrastructure is critical — especially when something goes wrong! One of the easiest ways to start with AWS monitoring is using CloudWatch Alarms with Amazon SNS (Simple Notification Service) to send alert emails.
In this blog, I’ll walk you through how I set up a CloudWatch Alarm to monitor an EC2 instance’s CPU usage and get instant email notifications when usage crosses a threshold. This was part of my AWS hands-on practice and a great beginner-friendly project to understand real-world cloud monitoring.
🧰 Prerequisites
An AWS account
An EC2 instance running (can be t2.micro)
IAM permissions to use CloudWatch and SNS
A valid email address to receive alerts
🪜 Step-by-Step Guide
✅ Step 1: Create an SNS Topic
Go to the SNS service from the AWS console.
Click "Create topic" → Select Standard type.
Name the topic: ec2CPUUtilisationAlarmTopic
Leave other settings as default and click Create topic.
✅ Step 2: Subscribe to the SNS Topic
After creating the topic, click on "Create subscription".
Protocol: Email
Endpoint: Enter your email address
You will receive a confirmation email — click the link inside it to confirm.
✅ Step 3: Create a CloudWatch Alarm
Go to CloudWatch → Alarms → Create Alarm
Click "Select Metric" → Choose:
EC2 → Per-Instance Metrics → CPUUtilization
Select your instance → click "Select metric"
Set:
Threshold: Greater than 50%
Evaluation period: 5 minutes
On next screen, choose:
- Send a notification to → SNS topic → select ec2CPUUtilisationAlarmTopic
Name your alarm: PRIO: cpu utilisation exceeded
Review & Create.
✅ Step 4: Simulate or Wait for an Alert
I used python script to simulate the CPU utilization usage above 50%.
When the CPU usage crosses the threshold, you’ll get an email from AWS Notifications:
✅ You’re now officially monitoring your EC2!
📸 Result Screenshot
🎯 What I Learned
How to connect AWS services (CloudWatch + SNS) for real-world automation
The basics of event-driven alerts
Confidence to explore Lambda actions or Slack integrations next
This simple setup can be a lifesaver in real infrastructure scenarios — and it’s 100% beginner-friendly.
🔁 Next Steps (What I’ll Try Next)
Integrating SNS with Lambda to auto-remediate issues
Pushing alerts to Slack or Teams
Monitoring memory or disk space using custom metrics
🏷️ Tags
#aws
#cloudwatch
#sns
#devops
#cloud
#monitoring
#womenintech
🙏 Thanks for Reading!
I’m currently expanding my cloud skills and sharing my learning through small, hands-on projects like this.
Would you like a follow-up blog template for:
Automating actions with Lambda
Setting up custom CloudWatch metrics
Creating a full CI/CD alert pipeline?
I’m happy to help you turn your next hands-on into a great article 💻✨
Subscribe to my newsletter
Read articles from asha khati directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
