1. Create EC2 for Amazon Linux
2. Create Cloudwatch Alarm
- In the AWS Management Console, type
cloudwatchinto the search box, and then select theCloudWatchservice.
- Click
All alarms
- Click
Create alarm
- Click
Select metric
- Click
EC2
- Click
Per-Instance Metrics
- Select
Cloudwatch Laband clickCreate alarm
- Set Period based on your need
- Select
Greater/Equaland Write80and then ClickNext
- Select
Create new topic, Write topic name and your email then clickNext
- Write
CPU High Usage Alertand clickNextthen clickCreate alarm
3. Install stress application at EC2
- In the AWS Management Console, type
EC2into the search box, and then select theEC2service. • On the Instances page, select theCloudwatch labcheck box, and then selectConnect.
- To install the Stress Application
sudo yum install stress -y
sudo stress --cpu 4
4. Monitor the CPU High Usage Alert alarm for the WebServer EC2 instance
- In the AWS Management Console, type
EC2into the search box, and then select theEC2service.
- Select
Cloudwatch labandMonitoring
5. Check CPU High Usage Alert
- In the AWS Management Console, type
Cloudwatchinto the search box, and then select theCloudWatchservice.
- Click
All alarms
- You will see alarm is
in alarmstate
Status: Complete ✅
Congratulations on successfully completing this.
Related Resources
- Lab Repository: AWS Learning Labs
- Technical Blog: Whispering Cloud Insights
- DEV Community: Thu Kha Kyawe

















Top comments (0)