Рет қаралды 4
#AWS Lab 281 Monitor an EC2 Instance
Summary of task 1
In this task, you created an SNS topic and then created a subscription for the topic by using an email address. This topic is now able to send alerts to the email address that you associated with the Amazon SNS subscription.
Summary of task 2
In this task, you viewed some Amazon EC2 metrics within CloudWatch. You then created a CloudWatch alarm that initiates an In alarm state when the CPU utilization threshold exceeds 60 percent.
pwd
sudo stress --cpu 10 -v --timeout 400s
Summary of task 3
In this task, you ran a command to load the EC2 instance to 100 percent for 400 seconds. This increase in CPU utilization activated the alarm to go into the In alarm state, and you confirmed the spike in the CPU utilization by viewing the CloudWatch graph. You also received a email notification alerting you of the In alarm state.
Lab summary
In this lab, you created a CloudWatch alarm that activated when the Stress Test instance exceeded a specific CPU utilization threshold. You created a subscription using Amazon SNS that sent an email to you if this alarm goes off. You logged in to the EC2 instance and ran a stress test command that spiked the EC2 instance to 100 percent CPU utilization.
This test simulated what could happen if a malicious actor were to gain control of an EC2 instance and spike CPU utilization. CPU spiking has various possible causes, one of which is malware.