grafana / timestream-datasource

Amazon Timestream in Grafana
https://grafana.com/grafana/plugins/grafana-timestream-datasource
Apache License 2.0
24 stars 19 forks source link

Use ARN authentication may meet ExpiredTokenException occasionally #92

Closed lcgogo closed 2 years ago

lcgogo commented 3 years ago

After I add ARN to the datasource and get the databases, tables correctly.

I switch to Explore try to write some query, some times, I met followed error but it may resume later

ExpiredTokenException: The security token included in the request is expired status code: 403, request id: 5U4D7KK6ZSNY4I3I3DTFUIVMEU

图片

I followed the guide to check https://aws.amazon.com/premiumsupport/knowledge-center/security-token-expired/?nc1=h_ls The server metadata shows the token has enough time range

cli@ip-172-23-2-62:\~$ date
Thu Jun 17 07:21:14 UTC 2021
cli@ip-172-23-2-62:\~$ curl http://169.254.169.254/latest/meta-data/iam/security-credentials/CoboInfraGrafanaTimestream
{
  "Code" : "Success",
  "LastUpdated" : "2021-06-17T07:20:40Z",
  "Type" : "AWS-HMAC",
  "AccessKeyId" : "***",
  "SecretAccessKey" : "***",
  "Token" : "***",
  "Expiration" : "2021-06-17T13:47:54Z"
}
tiratatp commented 3 years ago

You probably want to remove the tokens and access key since it contains a sensitive information.

andresmgot commented 2 years ago

hi @lcgogo, that seems like a temporary issue. The timestream data source will continuously pull data for some time. If the token expires while retrieving data, you may see this issue. Refreshing the page should force the token to be refreshed. Are you still able to reproduce this issue?

andresmgot commented 2 years ago

Closing this due to inactivity, please re-open it if you still find this issue.