============ Cloud Watch ============ => It is used for monitoring aws resources. => CloudWatch enables real-time monitoring of AWS resources such as Ec2 , EBS volumes, Elastic Load Balancing and RDS instances. ========== Usecase ========== => Create EC2 instance in aws cloud => Monitor that EC2 Instance 24/7 => If Ec2 instance CPU utilization is above 90 % then trigger alarm. => When alarm got triggered send email notification to management. ====================================== How to send Email notification in AWS ====================================== => In AWS we have SNS to send notifications SNS : Simple Notifcation Service => SNS works based on Pub and Sub Model Pub => Publisher (will send msg to sns topic) Sub => Subscriber (will recieve msg from topic) ============================== Cloud Watch & SNS - Lab Task ============================== 1) Create SNS Topic with Email Notification (Standard Create) Topic Name : ashokit 2) Configure Email Subscription in SNS Topic (Confirm Subscription recieved in email) 3) Create EC2 Instance and Configure Cloud Watch Alaram To Monitor -> Select EC2 Instance -> Action -> Monitor and trouble Shoot -> Manager Cloud Watch Alarms -> Create cloud watch Alarm Alaram Notification : Select SNS Topic which we have created Alaram Thresh Hold : Avg CPU Utiliation >= 5% 4) Connect to EC2 VM using ssh client and increase load $ sudo yum install stress -y $ sudo stress --cpu 8 -v --timeout 180s Note: Execute stress command 3 to 4 times... 5) Observe the behaviour of Cloud Watch / Alaram / SNS (We should get Email Notification) Note: When Alarm got triggered, its status will be changed to 'In Alarm' => We can Monitor our Alarm history (how many times it got triggered) (Goto Cloud Watch -> Select Alarms -> Click Alarm -> Click on History).