Replies: 1 comment
-
The documentation link you have there is specific to the CLI -- other SDKs to my knowledge, including Go v2 (and excluding botocore because that's what the CLI itself uses) do not support the The Go v2 SDK does support this behavior though, you can enable it in client config: client := s3.NewFromConfig(cfg, func (o *s3.Options) {
o.UsePathStyle = true
}) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Acknowledgements
go get -u github.com/aws/aws-sdk-go-v2/...
)Describe the bug
Let's assume bar.example.com is an S3 base endpoint that contains a bucket called foo. I can make requests against the bar bucket using virtual-style addressing at foo.bar.example.com, or by using path-style addressing at bar.example.com/foo. When I search for "S3 Custom command settings" on this page I see that I can switch between the two by setting
This does not seem to work for the Go SDK.
Moreover, when set to
auto
, both the AWS CLI and boto3 are smart enough to figure out that they need to use path-style addressing because virtual-style addressing results in hitting a domain with a self-signed cert (the provider I'm using, which is a popular 3rd party, does not have a wildcard cert for their buckets). The Go SDK is unique in that it just fails with an invalid cert error.Expected Behavior
I would expect the Go SDK to behave like boto3 and the AWS CLI. If you do a good job of fixing this issue, maybe AWS will let you rewrite the CLI in Go and then it can be fast.
Current Behavior
Not only does it not use path-style addressing when set to
auto
, it refuses to use path-style addressing when explicitly configured to use path-style addressing.Reproduction Steps
I'm getting an error in this example because of the self-signed cert, but you'll have the same problem with S3 if you wireshark your network traffic.
Possible Solution
No response
Additional Information/Context
No response
AWS Go SDK V2 Module Versions Used
Compiler and Version used
go version go1.22.1 linux/amd64
Operating System and version
6.8.1-arch1-1
Beta Was this translation helpful? Give feedback.
All reactions