Open
Description
Describe the Feature
At the moment SdkPresigner.Builder has 3 builder methods which are
Builder region(Region region);
Builder credentialsProvider(AwsCredentialsProvider credentialsProvider);
Builder endpointOverride(URI endpointOverride);
The same 3 methods exist within SdkClientBuilder (endpointOverride is inherited from SdkClientBuilder), however these methods belong to different hierarchies.
Is your Feature Request related to a problem?
For me as a developer there are different kinds of deployments
- Start application locally pointing to localstack (static region, anonymous credentials, endpoint overridden to localhost:port
- Start application locally pointing to stack in AWS cloud (static region, static credentials, no endpoint override)
- Start application in AWS (automatic region, automatic credentials from default chain, no endpoint override)
So for having a Presigner and a Client I'd have to have twice as much code doing just the same (providing configuration to AWS SDK constructs)
Proposed Solution
introduce 3 interfaces
public interface EndpointOverrideAware<B extends EndpointOverrideAware<T>, T> {
B endpointOverride(URI endpointOverride);
}
public interface CredentialsProviderAware<B extends CredentialsProviderAware <T>, T> {
B credentialsProvider(AwsCredentialsProvider credentialsProvider);
}
public interface RegionAware<B extends RegionAware <T>, T> {
B region(Region region);
}
and inherit both SdkPresigner.Builder and SdkClientBuilder from these interfaces.
- [v] I may be able to implement this feature request