AWR.Athena
AWR.Athena copied to clipboard
Issue with expired token
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?
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.