How do you create a variable that contains the DBInstance name of an AWS RDS instance?

Using Grafana 9.5.1
Looking to create a variable for a dashboard that contains an AWS RDS instance name based on another variable. For example, we have a variable called “Environment” that can be Dev, Staging, Prod.

We want to have another variable that gets an RDS instanceID by using Environment to filter the tags.

For the DBInstance variable, we set:
Select variable type: Query
Data source: Cloudwatch
Query type: Resource ARNs
Region: default
Resource type: AWS::RDS::DBInstance

When we “Run query”, we get an error:
Error updating options: Unexpected token ‘u’, “unexpected” is not valid JSON.

Import AWS EC2 | Grafana Labs and check how dashboard variables defined in thia dashboard and implement similar options for rds.

I understand how to do it, but I dont know how to get DBInstance name as a variable.

Can you give explicit instructions for that? The linked Dashboard does not have that.