Custom Visualization & Real-time Monitoring
CloudWatch dashboards are customizable home pages in the CloudWatch console that you can use to monitor your resources in a single view. You can create and manage dashboards to get a unified operational view of your AWS resources and applications, even those spread across different Regions.
Dashboards are composed of widgets, which are visual representations of your metrics and logs.
You can create a single dashboard that displays metrics and alarms from different AWS Regions, providing a global view of your operations.
Dashboards can be created, modified, and deleted programmatically using the AWS CLI or SDKs (`PutDashboard`, `GetDashboard`). The dashboard body is defined in a JSON string.
You can define and manage your dashboards as code using AWS CloudFormation (`AWS::CloudWatch::Dashboard`).
Dashboards can be shared with people who do not have direct access to your AWS account. You can share a dashboard publicly or restrict access to specific email addresses and passwords.
Dashboards can be set to automatically refresh, providing a near real-time view of your metrics without manual intervention.
Below is an example of a simple dashboard definition in AWS CloudFormation, which creates a dashboard with a single widget to monitor EC2 CPU Utilization.
Resources:
MyApplicationDashboard:
Type: AWS::CloudWatch::Dashboard
Properties:
DashboardName: "WebApp-Prod-Dashboard"
DashboardBody: !Sub |
{
"widgets": [
{
"type": "metric",
"x": 0,
"y": 0,
"width": 12,
"height": 6,
"properties": {
"metrics": [
[ "AWS/EC2", "CPUUtilization", "InstanceId", "${MyEC2Instance}" ]
],
"period": 300,
"stat": "Average",
"region": "${AWS::Region}",
"title": "EC2 CPU Utilization"
}
}
]
}