Running a shiny app with multiple folders served on shinyapps.io. The app has a function which pulls data from S3 (using a wrapper around get_bucket()
), which works fine locally as I set the AWS secret and credentials in my project .Renviron file, but once pushed I get a HTTP 403 error:
Error in value[[3L]](cond) : Forbidden (HTTP 403).
Calls: local ... tryCatch -> tryCatchList -> tryCatchOne -> <Anonymous>
Execution halted
Things I have tried:
- including the aws key, secret, and region directly in the
get_bucket()
call - changing bucket setting in aws to "open access"
- setting the credentials in global.R file which includes
sys.setenv()
- adding a .Renviron to the main project folder with the credentials
- Adding the credentials in the server.R file (to test, for confidentiality I don't want to do this)
I'm completely out of ideas on this one. It stems into a broader question of how to set .Renviron variables in a shinyapps.io app. Things I've read say to add to the main folder or other options, but as I say above hasn't worked.
I am reading the data in with shiny::reactivePoll()
but don't see how this is the issue.
Thanks for your help, been stuck on this for days.