Configuring Grafana connections
Grafana connections authenticate with an API key (or token). You store the key in Secrets Manager and reference that secret when you create the connection in AWS Glue Studio.
To configure a Grafana connection:
In Grafana, choose Administration, Users and access, Service accounts. Create a service account with a role that can read the entities that you plan to use, and then add a service account token. For more information, see Authentication options for the HTTP API
in the Grafana documentation. In Secrets Manager, create a secret that stores the service account token with key
api_key. Store the raw token without aBearerprefix. The connector sends it in theAuthorizationheader as a Bearer token.In the AWS Glue Studio console, choose Connections under Data Catalog, then choose Create connection.
Search for and choose Grafana as the data source. For the URL connection property, enter the base URL of your Grafana HTTP API, including the
/apipath. For example, usehttps://for Grafana Cloud, oryour-stack.grafana.net/apihttps://for a self-managed instance.grafana.example.com/apiFor credentials, choose the Secrets Manager secret you created, select the IAM role that AWS Glue can assume to read the secret, optionally set network options, and complete the connection creation.
Grant the IAM role associated with your AWS Glue job permission to read the secret.