google / go-cloud

The Go Cloud Development Kit (Go CDK): A library and tools for open cloud development in Go.
https://gocloud.dev/
Apache License 2.0
9.57k stars 812 forks source link

aws: lost "forcePathStyle" query parameter in AWS SDK V2 #3476

Closed SebouChu closed 2 months ago

SebouChu commented 3 months ago

Describe the bug

In 0.39.0, S3 URLs now use the V2 of the AWS SDK by default. Therefore, we lost the s3ForcePathStyle query parameter.

Based on their documentation, we might be able to reproduce the behavior of this parameter by allowing to set the HostnameImmutable endpoint option.

To Reproduce

Based on GCK documentation, having an S3URL with s3ForcePathStyle will crash. And removing the parameter might break operations like OpenBucket when endpoint host should not be changed.

Expected behavior

Operations should work with SDK V2, without the removed s3ForcePathStyle, and adding the support of a new parameter to set HostnameImmutable

Version

GCK 0.39.0

vangent commented 3 months ago

See #3472 and https://github.com/google/go-cloud/pull/3473.

SebouChu commented 3 months ago

thanks @vangent! I didn't see the closed issue about this, sorry :(