CloudGuild · Blog · Cheat sheets · Lessons · Certifications
Amazon CloudWatch — Monitoring and observability service
CloudWatch provides real-time monitoring and observability for AWS resources and applications.
What it is
- A monitoring and observability service for AWS resources and applications.
- Collects and tracks metrics, collects log files, and sets alarms.
When I reach for it
- When you need to monitor the health and performance of your AWS resources.
- To create alarms based on specific metrics (e.g., CPU utilization, memory usage).
- For centralized logging and log analysis using CloudWatch Logs.
Key architectural decisions
- Metrics vs. Logs: Decide whether you need metrics (numerical data) or logs (detailed event data).
- Retention Policies: Set appropriate retention periods for metrics and logs based on compliance and cost.
- Alarms: Configure alarms to trigger actions, such as auto-scaling, notifications, or Lambda functions.
Gotchas & exam traps
- Remember that CloudWatch has a limit on custom metrics (up to 500 metrics per account by default).
- Be aware that CloudWatch Logs incur costs based on data ingestion and storage.
- Alarms may have a delay in notification based on the configuration (e.g., evaluation period).
The architect view
- Use CloudWatch as an integral part of your observability strategy.
- Ensure that you utilize CloudWatch dashboards for visual insights into application performance.
- Leverage CloudWatch Events to respond to changes in your AWS environment automatically.