Getting AccessDenied when cli works
Please specify whether your issue is about:
- [ x] a possible bug
- [ ] a question about package functionality
- [ ] a suggested code or documentation change, improvement to the code, or feature request
If you are reporting (1) a bug or (2) a question about code, please supply:
This issue does seem to have come up from time to time although the existing issues all point to check_region=FALSE which should both no longer be an issue as it's now the default value nor did it resolve my issue (understandably so). I updated to the development version and the same symptoms persist.
Using aws.s3 I'm unable to connect to any bucket, even public ones although the CLI is working fine. I've also tried this on paws which seems to be working ok as well. Specifically I'm:
- Assuming an IAM role via command line to set my credentials
- In R, my credentials look correct via
locate_credentials()including region - e.g.
get_bucket("1000genomes")or a private bucket for my company. This also occurs withbucketList()
I always get AccessDenied, although if for instance I specify a nonsense bucket I'll get a NoSuchBucket so it's clearly connecting to some extent. Accessing the same buckets via the CLI always works fine.
The problem also occurs if I directly pass in my credentials into the call via the ... parameters.
Session Info:
R version 3.6.3 (2020-02-29)
Platform: x86_64-apple-darwin15.6.0 (64-bit)
Running under: macOS Mojave 10.14.6
Matrix products: default
BLAS: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRblas.0.dylib
LAPACK: /Library/Frameworks/R.framework/Versions/3.6/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] aws.signature_0.6.0 aws.s3_0.3.22
loaded via a namespace (and not attached):
[1] httr_1.4.2 compiler_3.6.3 R6_2.5.0 tools_3.6.3
[5] base64enc_0.1-3 curl_4.3 xml2_1.3.2 digest_0.6.27