diff --git a/settings.gradle.kts b/settings.gradle.kts index b310433..4c233b6 100644 --- a/settings.gradle.kts +++ b/settings.gradle.kts @@ -33,7 +33,7 @@ dependencyResolutionManagement { } create("aws") { version("awssdk", "2.25.60") - library("netty", "software.amazon.awssdk", "netty-nio-client").versionRef("awssdk") + library("crtClient", "software.amazon.awssdk", "aws-crt-client").versionRef("awssdk") library("s3", "software.amazon.awssdk", "s3").versionRef("awssdk") } diff --git a/spring-funk-aws/build.gradle.kts b/spring-funk-aws/build.gradle.kts index 43d6f60..0aeeb4c 100644 --- a/spring-funk-aws/build.gradle.kts +++ b/spring-funk-aws/build.gradle.kts @@ -8,15 +8,10 @@ dependencies { api(aws.s3) { exclude(group = "software.amazon.awssdk", module = "apache-client") } - implementation(aws.netty) + implementation(aws.crtClient) implementation(libs.slf4j) implementation(libs.oshai) compileOnly("io.micrometer:micrometer-core:1.13.0") - implementation("io.netty:netty-tcnative-boringssl-static:2.0.62.Final") - implementation("io.netty:netty-tcnative-boringssl-static:2.0.62.Final:linux-aarch_64") - implementation("io.netty:netty-tcnative-boringssl-static:2.0.62.Final:osx-aarch_64") - implementation("io.netty:netty-tcnative-boringssl-static:2.0.62.Final:linux-x86_64") - implementation("io.netty:netty-tcnative-boringssl-static:2.0.62.Final:osx-x86_64") testImplementation(project(":spring-funk-test")) testImplementation(libs.oshai) diff --git a/spring-funk-aws/src/main/kotlin/com/github/wakingrufus/funk/aws/s3/S3ClientBuilder.kt b/spring-funk-aws/src/main/kotlin/com/github/wakingrufus/funk/aws/s3/S3ClientBuilder.kt index 863a1cf..ad654b3 100644 --- a/spring-funk-aws/src/main/kotlin/com/github/wakingrufus/funk/aws/s3/S3ClientBuilder.kt +++ b/spring-funk-aws/src/main/kotlin/com/github/wakingrufus/funk/aws/s3/S3ClientBuilder.kt @@ -1,24 +1,21 @@ package com.github.wakingrufus.funk.aws.s3 -import io.netty.handler.ssl.SslProvider import software.amazon.awssdk.auth.credentials.AwsBasicCredentials import software.amazon.awssdk.auth.credentials.DefaultCredentialsProvider -import software.amazon.awssdk.http.nio.netty.NettyNioAsyncHttpClient +import software.amazon.awssdk.http.crt.AwsCrtAsyncHttpClient import software.amazon.awssdk.regions.Region import software.amazon.awssdk.services.s3.S3AsyncClient import software.amazon.awssdk.services.s3.S3AsyncClientBuilder internal fun newClientBuilder(clientConfig: S3ClientConfigurationProperties): S3AsyncClientBuilder { val awsBuilder = S3AsyncClient.builder() - val builder: NettyNioAsyncHttpClient.Builder = - NettyNioAsyncHttpClient.builder() - .sslProvider(SslProvider.OPENSSL) + val builder = AwsCrtAsyncHttpClient.builder() .maxConcurrency(clientConfig.maxConcurrency) clientConfig.readWriteTimeout?.also { - builder.readTimeout(it).writeTimeout(it) + // TODO fixme } clientConfig.connectionTimeout?.also { - builder.connectionAcquisitionTimeout(it).connectionTimeout(it) + builder.connectionTimeout(it) } awsBuilder.httpClientBuilder(builder) clientConfig.region?.also {