amazon s3 – Migrate connection settings in S3 SDK v2

I have this AWS Java V1 client configurations:

ClientConfiguration cc = new ClientConfiguration();
    cc.setConnectionMaxIdleMillis(10000);
    cc.setUseTcpKeepAlive(true);
    cc.setUseThrottleRetries(true);
    cc.setMaxErrorRetry(20);
    cc.setSocketBufferSizeHints(2024, 3024);
    cc.setValidateAfterInactivityMillis(5000);
    cc.setMaxConnections(100);
    AmazonS3 s3Client =
        AmazonS3ClientBuilder.standard().withClientConfiguration(cc)
            .withCredentials(new AWSStaticCredentialsProvider(basicSessionCredentials))
            .withRegion(s3Properties.getAwsRegion()).build();

I’m trying to migrate the code to V2 but I can’t find most of the settings:

S3Client s3Client = S3Client.builder()
              .region(Region.of(s3Properties.getAwsRegion()))
              .credentialsProvider(StaticCredentialsProvider.create(basicSessionCredentials))
              .serviceConfiguration(S3Configuration.builder()
                      .checksumValidationEnabled(true)
                      .pathStyleAccessEnabled(false)
                      .build())
              .overrideConfiguration(builder -> builder
                    .apiCallTimeout(Duration.ofMinutes(15))
                    .apiCallAttemptTimeout(Duration.ofSeconds(30))
              )
              .build();

Do you know how I can configure the same connection settings?

Read more here: Source link