Skip to content

fix: apply S3 service configurations to async S3 client (#14575) - #17549

Open
waterWang wants to merge 2 commits into
apache:mainfrom
waterWang:fix/s3async-service-config
Open

fix: apply S3 service configurations to async S3 client (#14575)#17549
waterWang wants to merge 2 commits into
apache:mainfrom
waterWang:fix/s3async-service-config

Conversation

@waterWang

Copy link
Copy Markdown

What this PR does

Fixes S3 service configurations (pathStyleAccess, dualStack, crossRegionAccess, useArnRegion, accelerateMode, chunkedEncoding) not being applied to the non-CRT async S3 client.

Root cause

DefaultAwsClientFactory.s3Async() used S3AsyncClient.builder() but never called applyServiceConfigurations on it. The sync s3() method did apply these settings, but the async path was missing the call.

Changes

  1. S3FileIOProperties.java: Changed applyServiceConfigurations generic bound from <T extends S3ClientBuilder> to <T extends S3BaseClientBuilder>S3BaseClientBuilder is the common base for both S3ClientBuilder (sync) and S3AsyncClientBuilder (async), and defines all the methods used (dualstackEnabled, crossRegionAccessEnabled, serviceConfiguration).

  2. AwsClientFactories.java: Added .applyMutation(s3FileIOProperties::applyServiceConfigurations) to the non-CRT S3AsyncClient.builder() chain.

Verification

  • applyServiceConfigurations accepts S3BaseClientBuilder which both sync and async builders extend
  • The existing sync s3() method continues to call applyServiceConfigurations unchanged
  • The CRT async path (S3CrtAsyncClientBuilder) is unaffected — it uses a separate builder hierarchy

Closes #14575

@github-actions github-actions Bot added the AWS label Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AWS: DefaultAwsClientFactory s3 / s3Async serviceConfiguration are not equivalent

1 participant