Imagine you run a website on AWS. Why is monitoring your resources important?
Think about how you would know if your website is slow or down.
Monitoring lets you see how your resources perform and alerts you to issues early, so you can fix them before users notice.
Look at this AWS CLI command and its output. What does it show?
aws cloudwatch get-metric-statistics --metric-name CPUUtilization --start-time 2024-06-01T00:00:00Z --end-time 2024-06-01T01:00:00Z --period 300 --namespace AWS/EC2 --statistics Average --dimensions Name=InstanceId,Value=i-1234567890abcdef0
Look at the metric name and statistics requested.
The command fetches average CPU usage data points for the given EC2 instance in 5-minute periods.
Arrange these steps in the correct order to create a CloudWatch alarm that notifies you when CPU usage is high.
Think about setting up notifications before creating the alarm.
You first create the SNS topic, subscribe your email, then create the alarm that uses the topic, and finally test it.
You set up a CloudWatch alarm with an SNS topic, but you never get email alerts. What could be the cause?
Check if you completed all steps to receive notifications.
SNS sends a confirmation email that must be accepted to activate notifications. Without confirmation, no alerts are sent.
To reduce costs and improve monitoring, which approach is best when setting CloudWatch metrics and alarms?
Think about balancing cost and usefulness.
Monitoring only important metrics and setting alarms on key thresholds helps catch issues without unnecessary cost or noise.