Skip to content

Using Amazon CloudWatch Metrics explorer to aggregate and visualize metrics filtered by resource tags

In this recipe we show you how to use Metrics explorer to filter, aggregate, and visualize metrics by resource tags and resource properties - Use metrics explorer to monitor resources by their tags and properties.

There are number of ways to create visualizations with Metrics explorer; in this walkthrough we simply leverage the AWS Console.


This guide will take approximately 5 minutes to complete.


  • Access to AWS account
  • Access to Amazon CloudWatch Metrics explorer via AWS Console
  • Resource tags set for the relevant resources

Metrics Explorer tag based queries and visualizations

  • Open the CloudWatch console

  • Under Metrics, click on the Explorer menu

Screen shot of metrics filtered by tag

  • You can either choose from one of the Generic templates or a Service based templates list; in this example we use the EC2 Instances by type template

Screen shot of metrics filtered by tag

  • Choose metrics you would like to explore; remove obsolete once, and add other metrics you would like to see

Screen shot of the EC2 metrics

  • Under From, choose a resource tag or a resource property you are looking for; in the below example we show number of CPU and Network related metrics for different EC2 instances with Name: TeamX Tag

Screen shot of the Name tag example

  • Please note, you can combine time series using an aggregation function under Aggregated by; in the below example TeamX metrics are aggregated by Availability Zone

Screen shot of the EC2 dashboard filter by tag Name

Alternatively, you could aggregate TeamX and TeamY by the Team Tag, or choose any other configuration that suits your needs

Screen shot of the EC2 dashboard filter by tag Team

Dynamic visualizations

You can easily customize resulting visualizations by using From, Aggregated by and Split by options. Metrics explorer visualizations are dynamic, so any new tagged resource automatically appears in the explorer widget.


For more information on Metrics explorer please refer to the following article: