Amazon CloudWatch
What is it?
Amazon CloudWatch is AWS's monitoring service that collects metrics, logs, and alarms so you can watch the health of your AWS resources and apps.
Explain like I'm 5
Why was it created?
Operating cloud resources requires visibility. CloudWatch was created as AWS's built-in way to collect metrics and logs and alert on problems.
Where is it used?
- Monitoring AWS resources
- Collecting application logs
- Alarms and notifications
- Dashboards for health
Why should developers care?
CloudWatch is the default observability tool on AWS, so cloud engineers use it to monitor and troubleshoot constantly.
How does it work?
AWS services automatically publish metrics to CloudWatch; you can also send custom metrics and logs. You build dashboards, and set alarms that trigger actions (like notifications or auto-scaling) when thresholds are crossed.
Real-world example
A CloudWatch alarm watches EC2 CPU usage and triggers auto-scaling to add servers when it stays above 70%, while logs stream in for debugging.
Common use cases
- Resource and app monitoring
- Centralized logs
- Alarms and auto-scaling triggers
- Operational dashboards
Advantages
- Built into AWS
- Metrics, logs, and alarms together
- Triggers automated actions
- Broad service coverage
Disadvantages
- Costs grow with volume
- Less flexible than some dedicated tools
- AWS-specific
- Querying can get complex
When should you use it?
For monitoring, logging, and alerting on AWS resources and applications.
When should you avoid it?
When you need cross-cloud or specialized observability a dedicated third-party tool handles better.
Alternatives
Related terms
Interview questions
Beginner
- What is CloudWatch?
- What does it collect?
Intermediate
- What is a CloudWatch alarm?
- How can an alarm trigger auto-scaling?
Senior
- How do you control CloudWatch costs at scale?
- When would you use a third-party tool over CloudWatch?
Common misconceptions
- "CloudWatch only does metrics" — it also handles logs, alarms, and dashboards.
- "Alarms only send notifications" — they can trigger automated actions like auto-scaling.
Fun facts
- Many AWS services publish metrics to CloudWatch automatically.
- CloudWatch alarms can drive auto-scaling, not just alerts.
Timeline
- 2009 — Amazon CloudWatch launches
Learning resources
Quick summary
Amazon CloudWatch is AWS's built-in monitoring service for metrics, logs, alarms, and dashboards, and can trigger automated actions like scaling.
Cheat sheet
- AWS monitoring service
- Metrics + logs + alarms
- Dashboards and notifications
- Alarms can trigger auto-scaling