Add a way to automatically register SDKPlugins like ExceptionInterceptors can be
- Dominant language
- Java
- Stars
- 2.6k
- Forks
- 1k
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 51
Description
### Describe the feature
Hi!
I noticed that [ExecutionInterceptors](https://docs.aws.amazon.com/java/api/latest/software/amazon/awssdk/core/interceptor/ExecutionInterceptor.html) have a way to be automatically registered onto a client (through /software/amazon/awssdk/global/handlers/execution.interceptors or the service specific counterpart).
It would be nice to have something similar to this but for SdkPlugins, like having a "/software/amazon/awssdk/global/plugins/sdk.plugins" file.
### Use Case
I'm working with the S3 SDK, and I wanted to find a way to auto apply configuration to the S3Client. I work at a company that requires specific configs while accessing our S3 compliant object store. We want to streamline setting the configs for internal users. It seems that the AWS config file can't set API call timeouts & user agent prefixes. It would be nice if we could have a way to set settings from a single call site in a project and not rely on using something like addPlugin() for each S3Client created, which is not always possible (e.g. when using Iceberg S3FileIO). Specifically we want to set API call timeout, API call attempt timeout, retry strategy, and user agent.
### Proposed Solution
This would work similarly to the `ExecutionInterceptors`. Those currently seem to use `ClasspathInterceptorChainFactory` which loads both the global interceptors from the global path, and also has a function that generated builders use (`createExecutionInterceptorFromResource(URL resource)`) to get their service specific interceptors. SdkPlugins could have something similar which loads plugins from the class path. Then the plugins could be added in `BaseClientBuilderClass::finalizeServiceConfigurationMethod()`, similarly to the `ExecutionInterceptors`.
### 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 ClasspathInterceptorChainFactory and the generated BaseClientBuilderClass::finalizeServiceConfigurationMethod(), which the issue identifies as the analogous execution-interceptor entry points. Trace how global and service-specific interceptor resources are loaded, then determine the corresponding SDK plugin resources and client-builder integration. Done means SDK plugins can be automatically discovered from the class path and applied to clients without each call site invoking addPlugin().
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, java
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100