Description
Type: Bug
Component: Parameter Store/S3
Describe the bug
When importing the library io.awspring.cloud:spring-cloud-aws-starter-parameter-store:3.2.0
in my project, it automatically imports the dependency io.awspring.cloud:spring-cloud-aws-autoconfigure:3.2.0
. The latter contains the class io.awspring.cloud.autoconfigure.s3.S3CrtAsyncClientAutoConfiguration
which has its enabling parameter set to true
by default.
This causes unwanted S3 functionality to be automatically activated in applications that only want to use io.awspring.cloud specifically for Parameter Store functionality while using S3 with a different library. The auto-configuration attempts to configure S3 settings that aren't needed and can generate errors in this scenario.
For other purposes in my project, I also need to import:
software.amazon.awssdk:s3-transfer-manager
software.amazon.awssdk.crt:aws-crt:0.21.7
This further contributes to the problem by activating the unwanted S3 CRT configuration.
Expected Behavior
The S3CrtAsyncClientAutoConfiguration
should only be activated when the library io.awspring.cloud:spring-cloud-aws-starter-s3
is explicitly imported, not when only using the Parameter Store module.
Proposed Solution
Modify the auto-configuration logic of S3CrtAsyncClientAutoConfiguration
so that it is activated only when:
- The dependency
io.awspring.cloud:spring-cloud-aws-starter-s3
is present, or - It is explicitly enabled through a configuration property
Environment
- Spring Boot: 3.3.5
- spring-cloud-aws-starter-parameter-store: 3.2.0
- Java: 21
Temporary Workaround
Currently, it's possible to manually disable this configuration by adding the following property:
spring.cloud.aws.s3.enabled=false