Query timeouts in 60s for Prometheus Datasource

I have a Prometheus query that takes 30s to run on Prometheus Console but times out exactly at 60s on Grafana. I’ve set the datasource and dataproxy timeout to 600s but that didn’t change anything. Is there any other setting I need to change to increase the timeout?
Query:
avg by (image, container_label_com_amazonaws_ecs_container_name, container_label_com_amazonaws_ecs_task_definition_family, container_label_com_amazonaws_ecs_cluster) (container_memory_working_set_bytes{image!="",container_label_com_amazonaws_ecs_cluster="prod"} * 100/container_spec_memory_limit_bytes{image!="",container_label_com_amazonaws_ecs_cluster="prod"})

Realized I could use a recording rule here.