# AWS dimension\_values cloudwatch - filter only existing resources

**URL:** <https://community.grafana.com/t/aws-dimension-values-cloudwatch-filter-only-existing-resources/37742>\
**Category:** Grafana\
**Created:** [October 9, 2020, 2:31pm UTC](https://community.grafana.com/t/aws-dimension-values-cloudwatch-filter-only-existing-resources/37742 "2020-10-09T14:31:46Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielpiotrhajduk](https://avatars.discourse-cdn.com/v4/letter/d/e9a140/32.png) [@danielpiotrhajduk](https://community.grafana.com/u/danielpiotrhajduk)\
**Post date:** [October 9, 2020, 2:31pm UTC](https://community.grafana.com/t/aws-dimension-values-cloudwatch-filter-only-existing-resources/37742/1 "2020-10-09T14:31:46Z")

</div>

Hello,

I would like to know how to filter out resources from cloudwatch that no longer exist - or rather only retrieve resources which return any values for given interval like “last 3h”.

To give an example:

Let’s say I create a variable query for: “dimension\_values($region,AWS/Kinesis,IncomingBytes,StreamName)”

And our workload creates and destroys Kinesis Streams on a daily basis (don’t ask why). How can I make this query to return only valid Kinesis streams from this metric - instead of returning each and every kinesis stream that was ever created matching patter…

I thought Grafana will be smart enough to filter out values of not existing resources, but its not.

Help ?

---

<div class="post-metadata">

**Author:** ![melrose](https://sea2.discourse-cdn.com/grafana/user_avatar/community.grafana.com/melrose/32/14147_2.png) [@melrose](https://community.grafana.com/u/melrose)\
**Post date:** [October 13, 2020, 8:13pm UTC](https://community.grafana.com/t/aws-dimension-values-cloudwatch-filter-only-existing-resources/37742/2 "2020-10-13T20:13:11Z")

</div>

> [@danielpiotrhajduk](#):
>
> Kinesis streams from this metric - instead of returning each and every kinesis stream that was ever created matching patter

I think its easier or the easiest way to achieve the goal to not destroy the kinesis streams. or let them getting destroyed.
