grafana-aws-athena-datasource icon indicating copy to clipboard operation
grafana-aws-athena-datasource copied to clipboard

UnrecognizedClientException error when changing Access & secret key

Open euniceek opened this issue 1 year ago • 0 comments

After changing the Access & secret key on Athena data source configuration, I am seeing UnrecognizedClientException error. It seems like access key ID and secret access key are cached at a datasource level in athena plugin (v2.2.0): https://github.com/mtanda/grafana-aws-athena-datasource/blob/2.2.0/credentials.go#L24-L223

Here is full error message:

error querying the database: error executing query: UnrecognizedClientException: The security token included in the request is invalid. status code: 400
Screenshot 2023-05-24 at 10 08 20 AM

Steps to reproduce

  • Create an Athena data source. The authentication provider choose an access & secret key and input the access key ID and secret access key.
  • Use Explore to query in Athena.
  • Create a new IAM user and obtain an Access Key ID and Secret Access Key.
  • Delete the IAM user that used as the data source in step 1.
  • Change the Access Key ID and Secret Access Key of data source to those obtained in step 3 and save them.
  • Use Explore to query in Athena, then I get the same error as the customer.
  • The error continues for while, then resolves without any action.

euniceek avatar May 24 '23 21:05 euniceek