0

I am trying use :

S3CrtAsyncClient.builder()
                .region(Region.of(region))
                .credentialsProvider(providerChain)
                .build();

It works fine on local but on docker it fails with the following exception:

Exception in thread "MigrationThread-5" software.amazon.awssdk.crt.CrtRuntimeException: S3Client.aws_s3_client_new: creating aws_s3_client failed (aws_last_error: AWS_IO_TLS_ERROR_DEFAULT_TRUST_STORE_NOT_FOUND(1173), Default TLS trust store not found on this system. Trusted CA certificates must be installed, or "override default trust store" must be used while creating the TLS context.) AWS_IO_TLS_ERROR_DEFAULT_TRUST_STORE_NOT_FOUND(1173)
    at software.amazon.awssdk.crt.s3.S3Client.s3ClientNew(Native Method)

I have set the default truststore in the env variable:

   - name: JAVA_OPTS
              value: "-Djavax.net.ssl.trustStore=/usr/lib/jvm/jre-17.0.6/lib/security/cacerts"

and in the code if I do System.getProperty("javax.net.ssl.trustStore") I get the right value but still the exception while I try to upload to S3 using S3CrtAsyncClient

Can anyone help on this?

sbolel
  • 3,486
  • 28
  • 45

0 Answers0