AWS announced on Friday that now you can specify and use variables for aggregated metrics in Amazon CloudWatch Dashboards. This was one of the long-awaited features most of us were waiting for.
Now you can navigate between different views projecting different data sets for the same resource. You can read more about it here, here, and here. You can also follow the steps specified in this example.
A quick test
I did a quick manual test to see how it works. You can probably also use this new feature in CDK, CloudFormation, and Pulumi, but I haven't tested them yet.
- Open CloudWatch Dashboard
- Create a new test dashboard with a test widget
- Click on "Actions" > "Variables" > "Create a variable"
- Create a variable, for example like this:
- Then you should be able to see the variable

