-
Notifications
You must be signed in to change notification settings - Fork 812
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
s3blob/blob: support additional endpoint query parameters #3486
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3486 +/- ##
==========================================
+ Coverage 73.14% 73.45% +0.30%
==========================================
Files 113 113
Lines 14983 15155 +172
==========================================
+ Hits 10960 11132 +172
+ Misses 3260 3258 -2
- Partials 763 765 +2 ☔ View full report in Codecov by Sentry. |
f1f85a3
to
7f41fbe
Compare
7f41fbe
to
d1a0e3d
Compare
aws/aws.go
Outdated
@@ -215,5 +246,12 @@ func V2ConfigFromURLParams(ctx context.Context, q url.Values) (awsv2.Config, err | |||
}) | |||
opts = append(opts, awsv2cfg.WithEndpointResolverWithOptions(customResolver)) | |||
} | |||
if dualStack { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm if you're just going to add them down here, I think it was better before, doing it right after the parameter was processed. I thought maybe they needed to be set in the awsv2.Endpoint like HostnameImmutable, but if that's not the case then my apologies, please change it back.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, interestingly enough, they aren't passed in with the resolver.
This commit adds the following query parameters for AWS: 1. `dualstack` 2. `fips` 3. `accelerate` (S3-only) This avoids the need for users to specify `endpoint`. For example, if my AWS S3 bucket is `my-bucket` in `us-east-1`, and you want to enable transfer acceleration, dual-stack support, and/or FIPS, you would need to configure `endpoint` with one of the following: 1. `my-bucket.s3-accelerate.amazonaws.com` 2. `my-bucket.s3-accelerate.dualstack.amazonaws.com` 3. `my-bucket.s3-fips.us-gov-east-1.amazonaws.com` 4. `my-bucket.s3-fips.dualstack.us-east-1.amazonaws.com` For example, for the last option, users can use `s3://my-bucket?fips=true&dualstack=true`. Closes google#3484
d1a0e3d
to
602e83e
Compare
This commit adds the following query parameters for AWS:
dualstack
fips
accelerate
(S3-only)This avoids the need for users to specify
endpoint
. For example, if my AWS S3 bucket ismy-bucket
inus-east-1
, and you want to enable transfer acceleration, dual-stack support, and/or FIPS, you would need to configureendpoint
with one of the following:my-bucket.s3-accelerate.amazonaws.com
my-bucket.s3-accelerate.dualstack.amazonaws.com
my-bucket.s3-fips.us-gov-east-1.amazonaws.com
my-bucket.s3-fips.dualstack.us-east-1.amazonaws.com
For example, for the last option, users can use
s3://my-bucket?fips=true&dualstack=true
.Closes #3484