Amazon CloudWatch
View on GitHubAmazon CloudWatch
Amazon CloudWatch is a monitoring and observability service that collects metrics, logs, and events from AWS resources, applications, and on-premises systems. It stores and indexes telemetry, evaluates alarms and rules, and provides dashboards and query-based log analysis. CloudWatch fits into observability and operations layers of AWS architectures to enable alerting, troubleshooting, and operational automation.
🗂 Resource Category
Management and Governance • Analytics
🧠 Exam Memory Hook
Think: "Metrics, logs and alarms for operational visibility = Amazon CloudWatch"
📖 Ownership
Classification: AWS Managed Service
AWS responsibilities: AWS operates, maintains, and patches the underlying CloudWatch service platform, control plane, and the physical infrastructure that runs the service. AWS is responsible for service availability of the CloudWatch API endpoints and the managed runtime that ingests, stores, indexes, and queries telemetry. AWS secures the service infrastructure and provides the mechanisms, APIs, and integrations (for example with EventBridge, SNS, and IAM) used to process and route telemetry and events.
Customer responsibilities: The customer configures which metrics, logs, and custom events are sent to CloudWatch, defines alarms, dashboards, log groups, retention settings, and query rules, and configures IAM permissions for access. The customer secures credentials and access control, monitors telemetry and alarms, and implements remediation or automation (for example using EventBridge, Lambda, Systems Manager, or Auto Scaling) as required. When using agents or running on Amazon EC2 or on-premises hosts, the customer is responsible for installing, configuring, updating, and securing those agents and the host operating system and applications.
Patching responsibilities: AWS patches and maintains the physical infrastructure and the CloudWatch managed service platform and runtime. AWS patches the service control plane and any managed runtimes that implement CloudWatch features. For customer-managed compute such as Amazon EC2 instances or on-premises servers that send telemetry, the customer patches the guest operating system, installed runtimes, agent software, libraries, dependencies, and customer applications. When telemetry originates from serverless compute (for example AWS Lambda) or other fully managed services, AWS is responsible for patching the underlying platform and runtime.
🏗 Typical Architecture
💡 Top 5 Features
- Collects and stores metrics from AWS services, custom applications, and on‑premises hosts.
- Ingests, stores, and indexes logs with support for log groups, retention, and log agents.
- CloudWatch Alarms evaluate metric thresholds or anomaly detection and can trigger actions or notifications.
- Dashboards provide customizable visualizations of metrics and log-derived metrics for operational views.
- Integrated query capability (CloudWatch Logs Insights) enables ad-hoc log analysis and troubleshooting.
✅ Top 5 Use Cases
- Infrastructure monitoring to collect EC2 and RDS metrics and raise alarms for resource saturation or failure signals.
- Application observability to aggregate custom application metrics and logs for end-to-end troubleshooting.
- Centralized logging to collect and query logs from servers, containers, and Lambda functions for incident investigation.
- Alerting and operational automation by using alarms and EventBridge rules to trigger remediation workflows or notifications.
- Performance baselining and anomaly detection using metric math, custom metrics, and alarms to detect deviation from expected behaviour.
🏗 Architecture Placement
CloudWatch operates as the telemetry aggregation and observability layer in a typical AWS architecture; resources such as EC2, Lambda, containers, on‑premises agents, and managed AWS services send metrics, logs, and events to it. CloudWatch stores and indexes that telemetry, evaluates alarms, presents dashboards, and can forward events or notifications to EventBridge, SNS, or Lambda for automation. Depending on configuration, CloudWatch resources are regional and account-scoped, with some features supporting cross-account or cross-region views.
🎯 Commonly Used With
- Amazon EC2
- AWS Lambda
- Amazon VPC
- AWS Identity and Access Management
- Amazon EventBridge
🌍 5 Real-World Examples
- A bank centralizes host and application logs into CloudWatch Logs and uses dashboards and alarms to detect transaction-processing failures for faster incident response.
- A healthcare provider monitors EHR application latency using custom metrics and CloudWatch Alarms to trigger scaling or investigation workflows.
- An online retailer uses CloudWatch dashboards and logs insights to troubleshoot checkout latency spikes during promotions for quicker triage.
- A telecommunications operations team aggregates EC2 and network metrics into CloudWatch and triggers EventBridge rules to invoke automated remediation for degraded nodes.
- A software platform team uses CloudWatch Logs Insights to query Lambda execution errors and reduce mean time to resolution during deployments.
🎓 AWS Exam Clues
- Use CloudWatch when you need metrics, logs, alarms, and dashboards integrated for operational monitoring of AWS resources.
- Choose CloudWatch Logs Insights for interactive log queries versus exporting logs to long‑term storage like Amazon S3 for archival and analytics.
- CloudWatch integrates with EventBridge and SNS to enable automated responses and notifications from alarms and events.
- Consider that CloudWatch resources are typically regional and account-level; cross-account or cross-region visibility requires explicit configuration.
- Operational cost and retention planning are decision factors because data ingestion, custom metrics, and log retention affect ongoing cost and design.
📝 Quick Revision
Amazon CloudWatch collects metrics, logs, and events to provide alarms, dashboards, and log queries for operational visibility. Use it when you need integrated monitoring and alerting; plan for data ingestion, retention costs, and IAM-based access control in production.
🏷 Keywords
metrics • custom metrics • CloudWatch Logs • Logs Insights • CloudWatch Alarms • dashboards • metric math • embedded metric format • metric streams • Contributor Insights • CloudWatch Agent • alarm actions