AWS Authentication
Support for connecting to AWS API is available from version 1.3.0
Steps to connect to AWS APIs#
- Create a new service account in AWS console. ( AWS Console -> IAM -> Access Management -> Users -> Add users)
- Select Access key - Programmatic access as AWS Credentials type
- Set required permissions ( preferably CloudWatch ReadOnly Permission )
- Copy the access key and secret key
- Install the infinity plugin in Grafana and add data source for the same
- Expand Authentication section and select "AWS"
- Select region. Example
us-east-1
- Select service. Example
monitoring
. You can find the appropriate service name here. - Enter the access key and secret key you copied in step 1
- Enter
https://monitoring.us-east-1.amazonaws.com
as allowed URL. (replace the service name and region as necessary ) - Click "Save and Test"
- Click the Explore button
- Enter the URL
https://monitoring.us-east-1.amazonaws.com?Action=ListMetrics
- Select "JSON" as Query type
- Optionally, Select "Backend" / "UQL" as parser.
- Enter the Root Selector
ListMetricsResponse.ListMetricsResult.Metrics
- Click Run Query and you will see the results
Config Editor#
Query with Backend parser#
Query with UQL parser#
sample uql query is given below
parse-json
| scope "ListMetricsResponse.ListMetricsResult.Metrics"
| mv-expand "dimension"="Dimensions"
| project "Namespace", "MeasureName", "Dimension Name"="dimension.Name", "Dimension Value"="dimension.Value"