CloudWatch Cross-account Cross-Region Dashboard

I have 4 AWS accounts (DTAP) and I want to be able to create one dashboard in Grafana with the cost per service (for all accounts).

So far I can easily create one dashboard in Dev with the costs for all services (using this dashboard: AWS Billing | Grafana Labs)

I also enabled cross account cross region in AWS (Cross-account cross-Region CloudWatch console - Amazon CloudWatch) which works nice (in AWS CloudWatch).

Now the problem which I am having is that I can’t specify an account selector in this Grafana dashboad 139, or modify the query in such way that I can get metric from different account than Dev:

REMOVE_EMPTY(SEARCH('Namespace="AWS/Billing" MetricName="EstimatedCharges"', 'Average', 3600))

Does anyone has any idea how to get this or which fields are the ones for account select in AWS? I need a programatic way of running “View data for” from the picture below and graph it in Grafana:

Also, I want to avoid creating multiple data sources for each account (due to other limitations)

Hi zatarra,

I have the same problem, did you find a solution?

David

Hello. I could not find an open issue in the GH repo, has anyone found a solution to this ?
Cheers,

I’m also interested in this feature. Any updates?

I am trying to figure this out myself. The best info I can find so far requires setting up IAM roles and policies and setting up trusts between them. For the CloudWatch datasource, you need to set up a distinct data source for each AWS account and specify an IAM role in the source account to assume.

So far, I have had no luck in getting this to work. Wondering if you ever found a solution to your issue.

Did you find any solution to this? @zatarra . I am in urgent need of a solution. pls reply

CloudWatch cross-account querying support was added in Grafana 9.3.0: https://github.com/grafana/grafana/pull/59362.

Make sure you have latest 9.3.x Grafana, correct IAM role and enabled cloudWatchCrossAccountQuerying feature toggle.

2 Likes