Chained variables using cloudwatch as datasource

Hi,
I’m looking for ways to chain variables to create dynamic dashboard. We use cloudwatch as datasource. My usecase is to load variable called “SQSQueue” based on the selection from another variable called the “Lambda”. I have created the variables as below
Lambda:
variable type: Query
Name: function
Label: Lambda
DataSource: Cloudwatch
Query Type: Dimension Values
Region: default
Namespace: AWS/Lambda
Metric: Errors
Dimension key: FunctionName
Outpu ex: function1, function2, function3
SQSQueue
variable type: Query
Name: Queue
Label: SQS Queue
DataSource: Cloudwatch
Query Type: Dimension Values
Region: default
Namespace: AWS/SQS
Metric: NumberIfEmptyReceives
Dimension key: QueueName
Output ex: queue1, queue2, queue3

Expectation is : function1 loads queue1, function2 loads queue2 and function3 loads queue3
How do I map these two variables so the SQSQueue dropdown values change based on the Lamdba selection?

I tried examples from the chained variable official Grafana docs Add variables | Grafana documentation but it is not working for the Dimention values querytype.

Any suggestions and ideas would be helpful