Logs
CloudWatch Logs is the central store for log data from many AWS services and custom applications. Logs are organized into log groups and log streams:- Log group: a collection of log streams that typically represents a service, application, or resource (for example, an AWS Lambda function).
- Log stream: a sequence of log events, often representing a single resource instance or execution.


Set appropriate retention on log groups to control storage costs and meet compliance requirements. You can change retention and create subscription filters to forward logs to Lambda, Kinesis, or third-party systems.
Live Tail
Live Tail streams log events in near real time from one or more selected log groups. It’s useful for debugging live traffic or testing changes.- Choose the log groups to include.
- Apply filters (by text, JSON field, or log stream).
- Start the Live Tail session to stream newly generated events to the console.

Live Tail shows live data — avoid displaying sensitive log contents in shared screens or dashboards. Filtering and sampling can reduce noise and cost.
Logs Insights
CloudWatch Logs Insights provides an interactive query language to filter, parse, and aggregate logs for in-depth analysis and visualization. Common query patterns:- Show the most recent events:
- Show oldest matching events (small result set):
Metrics
CloudWatch Metrics supply both platform-provided and custom application metrics. Metrics are organized by namespace (for example,AWS/EC2, AWS/Lambda) and can be filtered by resource identifiers.
- Standard EC2 metrics:
CPUUtilization,NetworkIn,NetworkOut,DiskReadOps, etc. - Lambda metrics:
Invocations,Errors,Duration,Throttles. - Custom metrics: push using the PutMetricData API.

Alarms
CloudWatch Alarms evaluate metrics against thresholds and trigger actions (SNS, Auto Scaling, Lambda, Systems Manager, etc.) when conditions are met. Create an alarm:- Go to Alarms → Create alarm.
- Select the metric (for example,
CPUUtilizationfor an EC2 instance). - Choose statistic and period (e.g., Average, 5 minutes).
- Select threshold type (static or anomaly detection) and specify the condition (e.g., GreaterThanThreshold = 60).
- Configure actions (for example, publish to an SNS topic).
- Name and create the alarm.


Events / EventBridge
CloudWatch Events evolved into Amazon EventBridge. Use EventBridge rules to respond to events in your environment and route them to targets such as Lambda, SNS, SQS, Step Functions, or API destinations.- Event source examples: AWS service events, schedule (cron), custom application events.
- Common targets: Lambda for processing, SNS for notifications, SQS for durable queues.

Dashboards
CloudWatch Dashboards provide customizable, shareable pages that combine graphs, numbers, and logs into a single view. Dashboards are great for operational runbooks, team overviews, and SRE monitoring. To create a dashboard:- Go to Dashboards → Create dashboard.
- Provide a name and select widget types (Line, Number, Gauge, Bar, Pie, Text).
- Pick metrics or log groups for each widget, position/resize widgets, then save.
CPUUtilization line widget and a NetworkPacketsOut number widget.


Other Observability Features
- Traces: integrate CloudWatch with AWS X-Ray for distributed tracing (not covered here).
- Service Insights: Container Insights and Lambda Insights provide deeper telemetry for those services.
- Integrations: forward logs to third-party systems or use Metric Streams to push metrics to external observability platforms.
Summary
CloudWatch is a comprehensive observability platform that helps you:- Centralize logs (CloudWatch Logs) and query them with Logs Insights.
- Troubleshoot in real time using Live Tail.
- Monitor metrics (built-in and custom), visualize them, and create alerts with Alarms.
- Route and react to events with EventBridge (formerly CloudWatch Events).
- Build and share Dashboards to keep teams informed.