cloudyr / aws.s3

Amazon Simple Storage Service (S3) API Client
https://cloud.r-project.org/package=aws.s3
381 stars 148 forks source link

Question: how to not sign request? #422

Open bart1 opened 2 years ago

bart1 commented 2 years ago

For some buckets it is desirable to not sign request (e.g. noaa-nexrad-level2). On the command line this can be done using --no-sign-request. aws.s3 does a good attempt to retrieve credentials, meaning if I have credentials in the .aws directory it tries to sign the request, resulting in a failure to retrieve data. Is there a way in the package to explicitly not sign requests?

On the command line for me this fails: aws s3 ls --recursive s3://noaa-nexrad-level2/2010/01/01/TJUA/ While this works: aws s3 ls --no-sign-request --recursive s3://noaa-nexrad-level2/2010/01/01/TJUA/

bart1 commented 2 years ago

Thinking a bit more about this might be resolved by adding an argument anonymous = TRUE/FALSE/no_sign_request=TRUE/FALSE to aws.signature::locate_credentials (s3HTTP passes arguments to that function). This also seems to relate to this issue: cloudyr/aws.signature#61