Allow SdkPlugins on S3Clients to Force Path Style.
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 51
Description
### Describe the feature
It would be nice if SdkPlugins that are targeting S3Clients could force path style access.
Most configuration that can be set when using S3Client.builder() can be accessed in SdkPlugins by using `((S3ServiceClientConfiguration.Builder) config)`, but path style access is not one of them.
### Use Case
I'm am trying to figure out how I can apply configurations to S3Clients at the company I am working at. We noticed that #2247 is affecting us, and wanted to force path style access as part of a plugin we are developing to standardize configuration. This is also helpful when the issue mentioned gets resolved and we want our users to swap back to using virtual host style domains, as my team could publish the change in our plugin and have it be consumed across the org without having to ask every team that uses this sdk to change their code.
### Proposed Solution
The workaround I was able to find involved making an ExecutionInterceptor that modifies `SdkInternalExecutionAttribute`'s CLIENT_CONTEXT_PARAM. However, the [docs](https://docs.aws.amazon.com/java/api/latest/software/amazon/awssdk/core/interceptor/SdkInternalExecutionAttribute.html) specifically mention "Only generated code from the SDK clients should set these values."
The customization.config in S3's codegen resources would probably need to be modified to add path style access to the `customClientContextParams` array, which I think gets read by `ServiceClientConfigurationUtils` when it adds fields.
### Other Information
_No response_
### Acknowledgements
- [x] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### AWS Java SDK version used
software.amazon.awssdk:s3:2.47.4
### JDK version used
openjdk 26.0.1 2026-04-21 OpenJDK Runtime Environment Temurin-26.0.1+8 (build 26.0.1+8) OpenJDK 64-Bit Server VM Temurin-26.0.1+8 (build 26.0.1+8, mixed mode, sharing)
### Operating System and version
Microsoft Windows 11 Enterprise 10.0.26100 Build 26100
Contributor guide
Research direction
Start with the S3 codegen customization.config and trace how its customClientContextParams are read by ServiceClientConfigurationUtils. Follow the S3Client.builder configuration and SdkPlugin path to determine the required exposed setting; done means an SdkPlugin can force path style access without modifying SdkInternalExecutionAttribute directly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, java
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 63/100