AWS dimension_values cloudwatch - filter only existing resources


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 ?

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