AWR.Athena icon indicating copy to clipboard operation
AWR.Athena copied to clipboard

Issue with expired token

Open Emelieh21 opened this issue 4 years ago • 1 comments

First of all: thanks a lot for this super useful package!

In general everything works well, but I have one issue that I have been trying to fix for a while, but couldn't figure out how...

I have aws credentials that expire every hour. As soon as they are refreshed, I get the following error in R when trying to query/reconnect:

Error in .jcall(drv@jdrv, "Ljava/sql/Connection;", "connect", as.character(url)[1], : java.sql.SQLException: [Simba][AthenaJDBC](100071) An error has been thrown from the AWS Athena client. The security token included in the request is expired [Execution ID not available]

The only work around I have now is to restart the R session, which is quite annoying. I was hoping to somehow refresh the credentials the AWR.Athena() function is using without having to restart the session. Is there a way to do this?

Emelieh21 avatar Sep 12 '19 10:09 Emelieh21

See also #20 and #21 for a discussion of how auth chain works with the JVM. You might try setting java properties. Alternatively, you might try running R in a subprocess, so that every AWR.Athena client is independent.

nfultz avatar Sep 12 '19 14:09 nfultz