TASK 1: Configure Amazon SNS ๐ง
Objective
Create an Amazon SNS topic and subscribe to email notifications for alerts.
What is Amazon SNS?
Full Name: Amazon Simple Notification Service
Type: Fully managed messaging service
Use Case: Application-to-Application (A2A) and Application-to-Person (A2P) communication
Purpose: Send real-time notifications via email, SMS, HTTP, SQS, Lambda, etc.
Lab tasks content summary ยท MD
AWS CloudWatch Monitoring Lab - Complete Task Content ๐
Overview
This lab teaches how to set up a complete monitoring solution on AWS that detects CPU spikes and sends automatic email alerts.
TASK 1: Configure Amazon SNS ๐ง
Objective
Create an Amazon SNS topic and subscribe to email notifications for alerts.
What is Amazon SNS?
Full Name: Amazon Simple Notification Service
Type: Fully managed messaging service
Use Case: Application-to-Application (A2A) and Application-to-Person (A2P) communication
Purpose: Send real-time notifications via email, SMS, HTTP, SQS, Lambda, etc.
Steps Completed:
Step 1: Navigate to SNS
AWS Console โ Search Bar โ Type "SNS" โ Click "Simple Notification Service"
Step 2: Create SNS Topic
Location: Simple Notification Service Console
Action: Left Menu (โฐ) โ Topics โ Create topic
Configuration:
โโ Type: Standard (selected)
โโ Name: MyCwAlarm
โโ Create topic (button clicked)
Result: Topic "MyCwAlarm" successfully created
Step 3: Create Email Subscription
Location: MyCwAlarm Topic Details Page
Action: Subscriptions Tab โ Create subscription
Configuration:
โโ Topic ARN: arn:aws:sns:us-west-2:xxx:MyCwAlarm (auto-filled)
โโ Protocol: Email (selected from dropdown)
โโ Endpoint: [Your Email Address]
โโ Create subscription (button clicked)
Status: "Pending confirmation"
Step 4: Confirm Email Subscription
Email Received: AWS Notification - Subscription Confirmation
Action:
- Check email inbox
- Open AWS notification email
- Click "Confirm subscription" link
Result: Status changed to "Confirmed"
Backend: SNS topic now linked to email address
What This Accomplished:
โ
Created messaging topic
โ
Linked email address to topic
โ
Verified email subscription
โ
Ready to send email alerts
Key Takeaway:
SNS acts as a bridge between AWS services (CloudWatch) and end users (your email). When alarms trigger, SNS automatically sends notifications to subscribers.
**
TASK 2: Create CloudWatch Alarm ๐จ
Objective
**
Configure a CloudWatch alarm to monitor EC2 CPU utilization and trigger when threshold is exceeded.
What is CloudWatch?
Full Name: Amazon CloudWatch
Type: Monitoring and observability service
Purpose: Monitor applications, systems, and AWS resources
Data Types: Logs, Metrics, Events
Users: DevOps Engineers, SREs, IT Managers, Developers
TASK 3: Stress Test EC2 Instance โก
Objective
Run CPU stress test to simulate high load and verify alarm triggers correctly.
Why Stress Test?
Simulates malware/attack scenarios
Tests alarm responsiveness
Validates monitoring system
Ensures notifications deliver
Security testing practice
TASK 4: Create CloudWatch Dashboard ๐
Objective
Create a customizable dashboard to visualize CPU utilization metrics in one place.
What is a CloudWatch Dashboard?
Purpose: Centralized monitoring interface
Customizable: Add/remove widgets
Multi-region: Monitor resources across regions
Real-time: Live metric updates
Widgets: Graphs, numbers, alarms, logs
Use Case: Quick overview for team monitoring
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ AWS Monitoring System โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ EC2 Instance (Stress Test) โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ Application/CPU Process โ โ โ
โ โ โ Stress Tool: 100% CPU Load โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโฌโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ (Emits metrics) โ
โ โ โ
โ โโโโโโโโโโโโโโโโ โ
โ โ CloudWatch โ โ
โ โ (Monitoring)โ โ
โ โโโโโโโโฌโโโโโโโโ โ
โ โ (Metric: CPUUtilization) โ
โ โ (Comparison: 95.2% > 60%) โ
โ โ โ
โ โโโโโโโโโโโโโโโโ โ
โ โ Alarm โ โ
โ โ (Triggered) โ โ
โ โโโโโโโโฌโโโโโโโโ โ
โ โ (IN ALARM state) โ
โ โ โ
โ โโโโโโโโโโโโโโโโ โ
โ โ SNS Topic โ โ
โ โ (MyCwAlarm) โ โ
โ โโโโโโโโฌโโโโโโโโ โ
โ โ (Message routing) โ
โ โ โ
โ โโโโโโโโโโโโโโโโ โ
โ โ Email Alert โ โ
โ โ Subscriber โ โ
โ โโโโโโโโฌโโโโโโโโ โ
โ โ โ
โ โ โ
โ โโโโโโโโโโโโโโโโ โ
โ โ Your Email โ โ
โ โ Inbox โ โ๏ธ Notification โ
โ โโโโโโโโโโโโโโโโ โ
โ โ
โ Dashboard Display: โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ LabEC2Dashboard โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โ โ CPUUtilization Graph โ โ โ
โ โ โ โฑโฒ โ โ โ
โ โ โ โฑ โฒ โ โ โ
โ โ โ โฑ โฒ โ โ โ
โ โ โ โฑโโโโโโโโโโโโโฒโโโโโโโ โ โ โ
โ โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ โ
โ โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ โ
โ โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ

Top comments (0)