I need to frequently switch between multiple AWS accounts for querying Athena.
Right now my workaround is to create multiple environment variables in my .Renviron file and then overwrite the default environment variables like so
Sys.setenv(AWS_SECRET_ACCESS_KEY = Sys.getenv("AWS_SECRET_ACCESS_KEY_2"),
AWS_ACCESS_KEY_ID = Sys.getenv("AWS_ACCESS_KEY_ID_2"))
con <- dbConnect(AWR.Athena::Athena(),
region='eu-west-1',
Schema='my_schema')
It's obviously not a big issue obviously but I'm wondering if there is a way to directly pass the credentials to the driver? I'm guessing the ~/.aws/credentials file is also not an option for me as it will always go for the default one? Happy to help working on a feature if you think it worthwhile, just need some pointers in the right direction
I need to frequently switch between multiple AWS accounts for querying Athena.
Right now my workaround is to create multiple environment variables in my .Renviron file and then overwrite the default environment variables like so
It's obviously not a big issue obviously but I'm wondering if there is a way to directly pass the credentials to the driver? I'm guessing the ~/.aws/credentials file is also not an option for me as it will always go for the default one? Happy to help working on a feature if you think it worthwhile, just need some pointers in the right direction