# Starting with Grafana v6.6.1 and Cloudwatch Metrics

**URL:** <https://community.grafana.com/t/starting-with-grafana-v6-6-1-and-cloudwatch-metrics/25935>\
**Category:** Grafana\
**Tags:** cloudwatch\
**Created:** [February 12, 2020, 4:18pm UTC](https://community.grafana.com/t/starting-with-grafana-v6-6-1-and-cloudwatch-metrics/25935 "2020-02-12T16:18:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![amylavarapu](https://avatars.discourse-cdn.com/v4/letter/a/8dc957/32.png) [@amylavarapu](https://community.grafana.com/u/amylavarapu)\
**Post date:** [February 12, 2020, 4:18pm UTC](https://community.grafana.com/t/starting-with-grafana-v6-6-1-and-cloudwatch-metrics/25935/1 "2020-02-12T16:18:29Z")

</div>

Hi,  
I am very new to Grafana and AWS and was trying this for a POC to learn more about it. I set-up a t2.micro ec2 instance and set-up a grafana container. I am able to access the URL and dashboards after importing but am unable to see any data and so was wondering what else I could be missing, Any pointers would be super-helpful. Thank you so much.

P.S.: I was following the steps listed on this blog-page to import some dashboards.

> **[How to get AWS metrics in Grafana in 5 minutes?](https://itnext.io/how-to-get-aws-metrics-in-grafana-in-a-minute-bc623b7bf6fb)**
>
> Get your AWS services metrics more reachable using Grafana.

# ================= This is how I instantiated my grafana docker container

docker run -d   
-p 3000:3000   
–name=grafana   
-e “GF\_SERVER\_ROOT\_URL=http://xxx.xx.xx.xx”   
-e “GF\_SECURITY\_ADMIN\_PASSWORD=xxxxxx”   
-e “GF\_AWS\_PROFILES=default”   
-e “GF\_AWS\_default\_ACCESS\_KEY\_ID=xxxxxxxxxxxxx”   
-e “GF\_AWS\_default\_SECRET\_ACCESS\_KEY=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”   
-e “GF\_AWS\_default\_REGION=us-east-1”   
-v grafana-storage:/var/lib/grafana   
grafana/grafana:latest

=======================  
docker container logs grafana  
t=2020-02-12T15:57:35+0000 lvl=eror msg=“Metric request error” logger=context userId=1 orgId=1 uname=admin error=“Failed to call ec2:DescribeInstances”

## ========================= Below is my set-up: Grafana: v6.6.1 IAM Policy Name: CustomerGrafana:

## { “Version”: “2012-10-17”, “Statement”: [{ “Sid”: “AllowReadingMetricsFromCloudWatch”, “Effect”: “Allow”, “Action”: [ “cloudwatch:ListMetrics”, “cloudwatch:GetMetricStatistics”, “cloudwatch:GetMetricData”], “Resource”: “_" }, { “Sid”: “AllowReadingTagsInstancesRegionsFromEC2”, “Effect”: “Allow”, “Action”: [“ec2:DescribeTags”, “ec2:DescribeInstances”, “ec2:DescribeRegions”], “Resource”: "_” }, { “Sid”: “AllowReadingResourcesForTags”, “Effect”: “Allow”, “Action”: “tag:GetResources”, “Resource”: “\*” } ] }

## Ec2 Instance Profile: grafana\_ec2\_policy --\> Attached Policy: CustomerGrafana IAM User: service\_grafana (programmatic Access provided): Permissions: CustomerGrafana Grafana DataSource Configuration: Datasource Name: cloudwatch; AuthProvider: “Access & Secret Key”. Datasource connection successful. Datasource: Tried ARN and Credentials File also but no luck. Same exception message. Steps I followed from the blog to import dashboards:

dashboards=(1516 677 139 674 590 659 758 623 617 551 653 969 650 644 607 593 707 575 1519 581 584 2969 8050);  
for dashboard\_id in “${dashboards[@]}”; do  
echo “Processing dashboard: $dashboard\_id”

# Get dashboard content

content=$(curl -s -k -u “$GRAFANA\_USERNAME:$GRAFANA\_PASSWORD” $GRAFANA\_HOST/api/gnet/dashboards/$dashboard\_id | jq .json)

# Override dashboard configuration

cat \> /tmp/dashboard.json \<\< EOF  
{  
“dashboard”: $content,  
“overwrite”: true,  
“folderId”: $GRAFANA\_DIRECTORY\_ID,  
“inputs”:  
[{  
“pluginId”: “cloudwatch”,  
“name”: “DS\_CLOUDWATCH”,  
“type”: “datasource”,  
“value”: “cloudwatch1”  
}]  
}  
EOF

# Publish dashboard on Grafana

## curl -s $GRAFANA\_HOST/api/dashboards/import -u “$GRAFANA\_USERNAME:$GRAFANA\_PASSWORD” -H “Content-Type: application/json” -H “Accept: application/json” -d @/tmp/dashboard.json echo “” rm /tmp/dashboard.json done
