CloudWatch Dashboards and Container Insights
Build multi-service operational dashboards and enable Container Insights for ECS and EKS cluster-level performance metrics.
CloudWatch Dashboards and Container Insights is a free AWS Solutions Architect lesson on CoddyKit — lesson 4 of 4. You can read the complete lesson below for free — then practise it hands-on in the browser with a built-in code editor and a 24/7 AI tutor. It is part of the AWS Solutions Architect learning path, one of 4 lessons in the course, and your progress syncs across the web and the CoddyKit app.
CloudWatch Dashboards Overview
CloudWatch Dashboards are customisable, multi-widget views of your AWS infrastructure that provide a unified operational picture. A dashboard can display metrics from multiple AWS services and accounts on a single screen using line graphs, number widgets, gauges, alarms, and log query results. Dashboards are global resources — one dashboard can show metrics from any Region. You can share dashboards publicly or restrict access through IAM policies.
Dashboard Widgets
CloudWatch dashboards support several widget types: Line and Stacked area graphs for time-series metrics, Number widgets for the latest metric value (great for KPIs), Bar charts for comparisons, Gauge for capacity indicators, Alarm status to show a summary of alarm states, Log table for Live Tail or Insights query results, and Text for labels and documentation. Combining widget types into one dashboard helps teams assess system health at a glance.
# Create a dashboard via CLI (body must be escaped JSON)
aws cloudwatch put-dashboard \
--dashboard-name ProductionOverview \
--dashboard-body '{
"widgets": [
{
"type": "metric",
"properties": {
"metrics": [["AWS/EC2","CPUUtilization","AutoScalingGroupName","my-asg"]],
"period": 60,
"stat": "Average",
"title": "ASG CPU Utilization"
}
}
]
}'Cross-Account and Cross-Region Dashboards
CloudWatch supports cross-account observability using monitoring accounts and source accounts. You can designate a central monitoring account, link source accounts to it, and build dashboards that pull metrics and logs from all linked accounts. This removes the need to switch console accounts to observe a multi-account environment. Cross-Region widgets within the same account are supported natively by specifying the Region in the dashboard JSON definition.
# Enable cross-account sharing in a source account
aws cloudwatch put-dashboard \
--dashboard-name MultiRegionView \
--dashboard-body '{
"widgets": [
{
"type": "metric",
"properties": {
"metrics": [
["AWS/RDS","DatabaseConnections","DBInstanceIdentifier","prod-db",{"region":"us-east-1"}],
["AWS/RDS","DatabaseConnections","DBInstanceIdentifier","prod-db-eu",{"region":"eu-west-1"}]
],
"title": "DB Connections: us-east-1 vs eu-west-1"
}
}
]
}'CloudWatch Live Tail
CloudWatch Live Tail (launched in 2023) lets you stream log events from one or more log groups in near real time directly in the CloudWatch console or CLI — similar to running tail -f on a log file. You can apply a filter pattern to see only matching events. Live Tail is invaluable during deployments or incident investigations when you need to observe what an application is doing right now without running full Insights queries.
# Start a Live Tail session for a Lambda function's logs
aws logs start-live-tail \
--log-group-identifiers '/aws/lambda/my-function' \
--log-event-filter-pattern 'ERROR'
# The output streams log events in real time until you cancel (Ctrl+C)What Is Container Insights?
CloudWatch Container Insights is a feature of CloudWatch that collects, aggregates, and summarises metrics and logs from containerised workloads running on Amazon ECS (EC2 and Fargate) and Amazon EKS (EC2 and Fargate). It provides pre-built dashboards for cluster, service, node, and pod-level performance without requiring you to instrument each application manually. Container Insights uses the CloudWatch Agent or the EKS Fargate log router to collect the data.
# Enable Container Insights on an ECS cluster
aws ecs update-cluster-settings \
--cluster my-ecs-cluster \
--settings name=containerInsights,value=enabled
# Enable Container Insights on EKS (via CloudWatch Agent DaemonSet)
eksctl utils update-cluster-logging \
--cluster my-eks-cluster \
--enable-types all \
--region us-east-1Container Insights Metrics
Container Insights collects metrics in the ECS/ContainerInsights and ContainerInsights namespaces. For EKS these include: pod-level — pod_cpu_utilization, pod_memory_utilization, pod_network_rx_bytes; node-level — node_cpu_utilization, node_memory_utilization, node_filesystem_utilization; cluster-level — cluster_failed_node_count, cluster_node_count. All metrics are tagged with cluster, namespace, service, and pod dimensions for precise filtering.
# Query pod memory utilization for a specific namespace
aws cloudwatch get-metric-statistics \
--namespace ContainerInsights \
--metric-name pod_memory_utilization \
--dimensions \
Name=ClusterName,Value=my-cluster \
Name=Namespace,Value=production \
--statistic Average \
--period 60 \
--start-time 2024-01-01T00:00:00Z \
--end-time 2024-01-01T01:00:00ZContainer Insights Dashboards in Console
When Container Insights is enabled, the CloudWatch console automatically provides pre-built Container Map and Performance Monitoring views. The Container Map shows your ECS tasks or EKS pods as a visual topology — colour-coded by health — with drill-down into individual container metrics. The Performance Monitoring view provides time-series graphs of cluster, node, pod, and container performance without any manual dashboard configuration.
ECS Task Performance with Container Insights
For ECS on EC2, Container Insights installs the CloudWatch Agent as a daemon service on each container instance. For ECS on Fargate, Container Insights uses the Fargate platform version 1.4.0 sidecar metrics collector. You access ECS metrics by cluster, service, task, or container dimension. A common alerting pattern is to alarm on MemoryUtilized approaching the task's MemoryReserved value to catch potential OOM conditions before they terminate tasks.
# Get memory reservation and utilisation for a service
aws cloudwatch get-metric-statistics \
--namespace ECS/ContainerInsights \
--metric-name MemoryUtilized \
--dimensions Name=ClusterName,Value=my-cluster Name=ServiceName,Value=api-service \
--statistic Average \
--period 300 \
--start-time $(date -u -d '1 hour ago' +%Y-%m-%dT%H:%M:%SZ) \
--end-time $(date -u +%Y-%m-%dT%H:%M:%SZ)Application Signals and ServiceLens
CloudWatch ServiceLens integrates metrics, logs, and traces into a unified service map. It requires AWS X-Ray to be enabled alongside CloudWatch. ServiceLens visualises end-to-end request flows between services, highlights latency bottlenecks, and shows error rates per service. CloudWatch Application Signals (the newer successor) automatically instruments applications to expose SLOs and SLIs without code changes, enabling reliability tracking beyond raw metrics.
Dashboard Best Practices
Effective CloudWatch dashboards follow these best practices: separate dashboards by audience (operational vs executive vs developer), use alarm status widgets as the first thing teams see on call, pin dashboards for frequent access, and use dynamic references with CloudFormation to keep dashboard metric references consistent with actual resource names. Avoid overloading a single dashboard — readability matters when you're diagnosing an incident under pressure.
CloudWatch Contributor Insights
CloudWatch Contributor Insights analyses structured log data to identify the top N contributors to a metric over time. For example, it can show which IP addresses generate the most 5xx errors, which API paths have the highest request volume, or which customer IDs have the most DynamoDB throttles. Rules define the JSON field to extract and aggregate on. Results appear as time-series graphs that update continuously as new log data arrives.
# Enable Contributor Insights on a DynamoDB table
aws dynamodb enable-kinesis-streaming-destination \
--table-name my-table
# Or enable CloudWatch Contributor Insights via the console:
# CloudWatch -> Contributor Insights -> Create rule
# Log group: /aws/dynamodb/tables
# Contributor field: $.TableName
# Aggregation: COUNT by $.requestIDQuick Check
Test your understanding of AWS Solutions Architect (SAA-C03) concepts from this lesson.
Lesson Recap
In this lesson you learned: CloudWatch Dashboards support multiple widget types and can aggregate metrics across accounts and regions, Container Insights automatically collects pod- and node-level metrics from ECS and EKS without manual instrumentation, and Contributor Insights identifies top contributors from structured log data. Next up we explore CloudTrail Trails and Event History for API-level auditing.
Frequently asked questions
Is the “CloudWatch Dashboards and Container Insights” lesson free?
Yes — the full text of “CloudWatch Dashboards and Container Insights” is free to read here on the web, and the AWS Solutions Architect course includes 4 lessons in total. To practise it interactively (a built-in code editor and a 24/7 AI tutor) and unlock the rest of the AWS Solutions Architect course, upgrade to CoddyKit PRO.
What will I learn in “CloudWatch Dashboards and Container Insights”?
Build multi-service operational dashboards and enable Container Insights for ECS and EKS cluster-level performance metrics. You practise AWS Solutions Architect with hands-on code you run directly in the browser, and a 24/7 AI tutor answers your questions as you work through the lesson.
Do I need any experience to start AWS Solutions Architect?
No prior experience is required. AWS Solutions Architect on CoddyKit is structured for beginners through advanced learners; this is — lesson 4 of 4, so you can start here or from the beginning and move at your own pace.
How long does the “CloudWatch Dashboards and Container Insights” lesson take?
Most CoddyKit lessons take about 5–10 minutes. Each one is bite-sized and interactive, so you make steady progress and pick up exactly where you left off across the web and the app.
Can I write and run code in this AWS Solutions Architect lesson?
Yes. Every AWS Solutions Architect lesson includes a built-in code editor, so you write and run real code right in your browser and get instant AI feedback — no local setup required.
All lessons in this course
- CloudWatch Metrics, Namespaces, and Dimensions
- CloudWatch Alarms and Composite Alarms
- CloudWatch Logs and Log Insights
- CloudWatch Dashboards and Container Insights