Closed andyhd closed 7 years ago
get_credentials
aws.signature
You can run the following in your analytics platform Rstudio instance
library(devtools) install_github("moj-analytical-services/s3tools", ref = "no-fork-aws-sig", force = TRUE) creds <- s3tools::get_credentials() Sys.getenv("AWS_SESSION_TOKEN")
This should return a valid AWS token. The creds object can be refreshed (a new token retrieved) using creds$refresh() - this should update the token only if it is is about to expire (or has already).
creds
creds$refresh()
What
get_credentials
and supporting code from https://github.com/ministryofjustice/aws.signature/tree/credentials-resolver into s3toolsaws.signature
aws.signature
library and not have to maintain our own forkHow to review
You can run the following in your analytics platform Rstudio instance
This should return a valid AWS token. The
creds
object can be refreshed (a new token retrieved) usingcreds$refresh()
- this should update the token only if it is is about to expire (or has already).