-
Notifications
You must be signed in to change notification settings - Fork 813
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 parameters: UseDualStack, UseFips, and UseAccelerate options #3484
Comments
IIUC, most (all?) of these options are not blob-specific, so they are currently implemented in aws/aws.go. There is a V2-specific function there ( |
Yeah, I was trying to add the Deprecated: The global endpoint resolution interface is deprecated. The API for endpoint resolution is now unique to each service and is set via the EndpointResolverV2 field on service client options. Setting a value for EndpointResolver on aws.Config or service client options will prevent you from using any endpoint-related service features released after the introduction of EndpointResolverV2. You may also encounter broken or unexpected behavior when using the old global interface with services that use many endpoint-related customizations such as S3. I'm also seeing warnings like this in the tests:
I think this means setting the resolver must be pushed into each service-specific endpoint, such as: cfg, err := gcaws.V2ConfigFromURLParams(ctx, q)
if err != nil {
return nil, fmt.Errorf("open bucket %v: %v", u, err)
}
clientV2 := s3v2.NewFromConfig(cfg, func(o *s3v2.Options) {
o.EndpointResolverV2 = <set the service-specific resolver here>
}) This can probably done as a separate issue. |
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
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
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
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
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
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
Is your feature request related to a problem? Please describe.
https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/endpoints/ mentions additional parameters that can be configured:
UseDualStack
UseFips
UseAccelerate
These were added upstream in aws/aws-sdk-go-v2#836.
Describe the solution you'd like
The AWS SDK v2 URL probably should accept the following query parameters:
dualstack
fips
accelerate
As described in https://aws.github.io/aws-sdk-go-v2/docs/configuring-sdk/endpoints/#migration, we probably should migrate to v2 of the endpoint resolution. Note that
EndpointResolverWithOptionsFunc
is deprecated and should likely be replaced with the v2 mechanism:go-cloud/aws/aws.go
Line 207 in d2adbc5
Describe alternatives you've considered
While the
endpoint
can probably be used to support this functionality, users would have to know their region-specific endpoints. For example, if my AWS S3 bucket ismy-bucket
inus-east-1
, and I want to enable transfer acceleration, dual-stack support, and FIPS, I 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
This forces the application to build the hostname, when this seems more appropriately handled by the SDK.
References:
Additional context
I believe
UseAccelerate
can be added via something like:The text was updated successfully, but these errors were encountered: