cloudyr / aws.signature

Amazon Web Services Request Signatures
https://cloud.r-project.org/package=aws.signature
31 stars 33 forks source link

Use config package to store credentials #32

Open leeper opened 6 years ago

leeper commented 6 years ago

From @chrowe via https://github.com/cloudyr/aws.s3/issues/240

Please specify whether your issue is about:

Is it possible to retrieve S3 credentials using the config package instead of environment variables without have to specify them every time?

Put your code here: I know that I can set them inline like this... config.yml

default:
  s3:
    bucket: 'my_bucket'
    key: YOUR_AWS_ACCESS_KEY
    secret: YOUR_AWS_SECRET_ACCESS_KEY

R code

s3conf <- config::get("s3")
get_bucket(
  bucket = s3conf$bucket,
  key =  s3conf$key,
  secret =  s3conf$secret
) 

But it would be nice to be able to just set that once like you can with Sys.setenv

vspinu commented 4 years ago

I think the default .aws/config should be used instead of inventing custom configurations options. #53