Grafana Series - Unified Display - 5 - AWS CloudWatch Dashboards

This article was last updated on: May 17, 2026 am

Series Articles

Highly recommend using the monitoringartist/grafana-aws-cloudwatch-dashboards dashboards on GitHub. This repo contains dashboards for a wide range of AWS resources, including but not limited to:

  • EC2
  • EBS
  • API GW
  • Autoscaling
  • Billing
  • EKS
  • Lambda
  • Logs
  • RDS
  • S3

The quality is excellent and the design is very well thought out.

This article uses the AWS EC2 Dashboard (ID: 617) as an example.

│ 📝Notes:
│ The prerequisite is that your IAM Role or User has the corresponding permissions, namely the ones mentioned in the previous article:
│ “ec2:DescribeTags”, “ec2:DescribeInstances”, “ec2:DescribeRegions” and the related Policy for “tag:GetResources”.
│ Otherwise, you will encounter errors like Error updating options: Query data error.

Compared to the built-in dashboards that come with the AWS CloudWatch data source, this dashboard excels by using ec2_instance_attribute to query and retrieve variables. Details are covered in the following sections.

Variables

Region

The most commonly used variable in AWS: region.

  • Name: region
  • Type: Query
  • Query: regions()

The result looks like this:

Region Variable

By querying ec2_instance_attribute, we can obtain more meaningful EC2 groupings and hostnames, instead of the long, non-human-readable i-xxxxxxxx EC2 IDs from the built-in dashboards.

These include:

instancename

  • Name: instancename
  • Type: Query
  • Query: ec2_instance_attribute($region, Tags.Name, {})
  • Custom all value: *

If you need to reuse instancename, you can do so as follows:

instanceid

  • Name: instanceid
  • Query: ec2_instance_attribute($region, InstanceId, {“tag:Name”: [“$instancename”]})

From there, you can query the EC2 instance type and volume information based on instanceid.

instancetype

  • Name: instancetype
  • Query: ec2_instance_attribute($region,InstanceType, {“instance-id”: [“$instanceid”]})

volumeid

  • Name: volumeid
  • Query: ebs_volume_ids($region, $instanceid)

The final result looks like this:

AWS EC2 Dashboard

For the complete and detailed usage of ec2_instance_attribute, refer to this document:

📚️ References


Grafana Series - Unified Display - 5 - AWS CloudWatch Dashboards
https://e-whisper.com/posts/9378/
Author
east4ming
Posted on
May 5, 2023
Licensed under