๐Ÿงช Lab 5: Cloud Monitoring & Incident Response (AWS)

Course: CompTIA Cloud+ CV0-004
Objective: Set up cloud monitoring, create alarms, and simulate a basic incident response process using AWS CloudWatch.


๐ŸŽฏ Goals


๐Ÿ“Š Part 1: Enable Monitoring on EC2

  1. Go to EC2 Dashboard
  2. Select your instance (cloudplus-ec2)
  3. Under Monitoring tab, click Enable Detailed Monitoring

โœ… Checkpoint: Instance now sends 1-minute metrics to CloudWatch.


๐Ÿ”” Part 2: Create CloudWatch Alarm

  1. Go to CloudWatch โ†’ Alarms โ†’ Create alarm
  2. Choose EC2 โ†’ cloudplus-ec2 โ†’ Metric: CPUUtilization
  3. Conditions:
  4. Threshold: CPUUtilization > 70% for 2 datapoints within 5 minutes

  5. Notification:

  6. Create new SNS topic โ†’ cloud-alerts
  7. Email subscription: your email address
  8. Confirm the subscription from your inbox

โœ… Checkpoint: Alarm and notification system are ready.


๐Ÿ”ฅ Part 3: Simulate High CPU Usage

  1. SSH into your EC2 instance:
ssh -i "cloudplus-key.pem" ec2-user@<your-public-ip>
  1. Install stress tool:
sudo amazon-linux-extras install epel -y
sudo yum install -y stress
  1. Run stress test:
stress --cpu 2 --timeout 300

โœ… Checkpoint: Alarm should trigger within 5 minutes and send an email.


๐Ÿ› ๏ธ Part 4: Review Alarm and Take Action

  1. Go back to CloudWatch โ†’ Alarms
  2. View status change and notifications
  3. Take manual action (e.g., reboot instance or notify team)

โœ… Checkpoint: Youโ€™ve simulated an incident and verified your alert workflow.


โœ… Lab Complete