Closed davidread closed 5 years ago
It's worth noting, following our experience of sys envs for PAT storage, that Sys.setenv()
if run only in the current session, will only set the environment variable for that session and that project--a change of either wipes it.
A stronger fix, instead, is to include this envset
in a user .Rprofile
that initialises for all sessions for all projects. The call (which only needs to be done once for a user) is
writeLines('Sys.setenv("AWS_DEFAULT_REGION" = "eu-west-1")', con = "~/.Rprofile")
Yeah, I expect the problem was something like this.
Since the day after this issue was opened, the env variable was changed to be set in /usr/local/lib/R/etc/Renviron
rather than /etc/R/Renviron
: https://github.com/ministryofjustice/analytics-platform-rstudio/commit/cadc931a428ea56eae9445262b79d0b040f8829a which may have helped - I'll assume this fixed the issue as we've not got any records of it occurring again. I think would set the env var whenever R Studio starts. Happy to look at this again if anyone gets it again.
What happened?
Workaround:
Steps to reproduce the problem
TODO