-
Notifications
You must be signed in to change notification settings - Fork 823
Description
Describe the bug
The aws-sdk-go (v1) module is being removed soon, and so I'm trying to migrate to aws-sdk-go-v2 (see also #3489).
I have a need to sometimes use the anonymous CredentialsProvider, and with V1 I could achieve this by setting the ConfigProvider
field with an AWS session properly configured with the anonymous provider.
I'm using the blob.BucketURLOpener
interface to support non-S3 buckets as well via URLs, and so using s3blob.OpenBucketV2
with a custom client isn't an option.
To Reproduce
Attempt to use &s3blob.URLOpener{UseV2: true}
to open S3 buckets with anonymous credential...
Expected behavior
There are a few ways to achieve this - one way would be to allow adding additional config.LoadOptions
items to be provided to s3blob.V2ConfigFromURLParams
via a new field in the s3blob.URLOpener
struct.
Alternately, a new URL query parameter could be supported - something like anonymous=true
. FWIW, that would be useful in the gcsblob
package as well.
Version
v0.40.0 (latest)
Additional context
n/a