aws / aws/aws-sdk-java-v2

Allow SdkPlugins on S3Clients to Force Path Style.

Offen
#7,153 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
feature-request p3
Vorherrschende Sprache
Java
Sterne
2.6k
Forks
1k
Ø Merge
2 T. 9 Std.
Gemergte PRs (30 T.)
51

Beschreibung

### 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

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne mit der S3-Codegen-customization.config und verfolge, wie ihre customClientContextParams von ServiceClientConfigurationUtils gelesen werden. Folge der Konfiguration von S3Client.builder und dem Pfad über SdkPlugin, um die erforderliche nach außen bereitgestellte Einstellung zu bestimmen; fertig ist es, wenn ein SdkPlugin den Path-Style-Zugriff erzwingen kann, ohne SdkInternalExecutionAttribute direkt zu ändern.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
aws, java
Bereich
api
Issue-Typ
Feature
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Ruhig
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
63/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.