Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding datasource to Amazon Managed Grafana outputs ec2_iam_role error #338

Closed
amazonchris opened this issue Jun 26, 2024 · 2 comments · Fixed by #339
Closed

Adding datasource to Amazon Managed Grafana outputs ec2_iam_role error #338

amazonchris opened this issue Jun 26, 2024 · 2 comments · Fixed by #339
Labels
datasource/Athena type/bug Something isn't working

Comments

@amazonchris
Copy link

What happened: I deploy dashboards programmatically via the Grafana API, my code has not changed. However, when I create a new 9.4 workspace in Amazon Managed Grafana, install the Athena plugin and attempt to configure it as a Datasource I get the following error:

attempting to use an auth type that is not allowed: "ec2_iam_role": Failed to create client

Screenshot 2024-06-26 at 9 01 42 AM Screenshot 2024-06-26 at 9 05 21 AM

My SSO user from AWS Identity center also has full permissions to the account and is defined as the Admin user of the workspace.

Note, my Grafana Workspace Role does have full access to Athena.

The call I am making in my lambda is:

                  if plugin == 'athena':
                    body = {'name':self.datasource_name,'type':'grafana-athena-datasource','access':'proxy','url':'','user':'','database':'','basicAuth':False,'isDefault':False,'jsonData':{'authType':'ec2_iam_role','catalog':'AwsDataCatalog','database':self.athena_db,'defaultRegion':self.athena_region,'provisionedBy':'COAST','workgroup':self.athena_workgroup},'readOnly':False}
                  if plugin == 'cloudwatch':
                    body = {'access': 'proxy', 'isDefault': True, 'name': 'Cloudwatch', 'type': plugin}

What you expected to happen:
The datasource provisioned via lambda without issue in the past.

How to reproduce it (as minimally and precisely as possible):
Add Athena Datasource in Grafana, select Workspace IAM role in the drop down and enter ARN of role.

Environment:

  • Grafana version: 9.4
  • Plugin version:2.16.1
  • OS Grafana is installed on: Amazon Managed Grafana
  • User OS & Browser:
  • Others:
@amazonchris
Copy link
Author

amazonchris commented Jun 26, 2024

My last known working version I have installed in another workspace is 2.14.1

@kevinwcyu
Copy link
Contributor

kevinwcyu commented Jun 26, 2024

Hi @amazonchris, I just released v2.16.2 of the Athena data source which should fix this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
datasource/Athena type/bug Something isn't working
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants