CloudWatch
Solution Architect Associate
Developer Associate
Security Specialty
- A monitoring service to monitor your AWS resources and apps running on AWS
- Allows you to create dashboards with metrics for any service that supports CloudWatch that you’re using
- Also allows for the creation of alarms for these metrics
- There are no default alarms
- AWS cannot see past the hypervisor level
- Can monitor system level metrics like
- Can also montior application level (custom) metrics if you install the CloudWatch agent
- Metrics available by default for EC2: (big exam topic, know these at least by category!!)
- CPU: CPU Credit Balance, CPU Credit Usage, CPU Utilization
- Disk: Disk Read Bytes, Disk Read Ops, Disk Write Bytes, Disk Write Ops
- Network: Network In,m Network Out, Network Packets In, Network Packets Out
- Status: Status Check Failed, Status Check Failed Instance, Status Check Failed System
- Note: RAM Utilization is a custom metric. By default, EC2 monitoring is 5 min interval, you can enable detailed montioring to make it 1 min (likely on exam!!)
- You can store and retrieve data in CloudWatch logs for as long as you want
- Metrics are stored every 5 minutes, though some services default to 3 min. If you enable detailed monitoring this can be down to 1 min
- For custom metrics, the minimum granularity you can log for is 1 minute
- You can create alarms to monitor CloudWatch metrics in your account, and then you can trigger actions when these alarms are sent
- Can send notifications, trigger Lambdas, etc.
- CloudWatch Events: Help you respond to state changes. When state changes happen, they events will be sent into the event stream. Should not be on the exam aside from basic knowledge that they exist.
- Logs help you aggregate, monitor and store logs. Not relevant to the exam.
- You install a CW agent on your EC2 instance, and that agent will report to CW.
- The default length of time associated with a CloudWatch statistic is 1 minute
- You can create an alarm to stop, terminate, reboot or recover an instance
CloudWatch Alarms
- Used to trigger notifications for any metric
- Alarm States: OK, INSUFFICIENT_DATA, ALARM
- Each alarm can have one of 3 main targets (i.e. can trigger actions on)
- EC2 Instances
- EC2 Autoscale
- Amazon SNS
CloudWatch vs CloutTrail vs Config
- CloudWatch is for monitoring, CloudTrail is for auditing. (Know this for the exam!!!)
- CloudWatch monitors performance
- CloudTrail monitors API calls in the AWS Platform (i.e. infrastructure changes) - Auditing purposes
- Config records the status of your AWS enviornment and notifies you of changes