Issue with AWS Java SDK v2 and Lucee 6

We’re using the AWS Java SDK v2 and are seeing a difference in behavior between Lucee 5 and Lucee 6.

It was working on the lambdacfc project where I noticed this issue.

Here’s a stripped down repro case: GitHub - mjclemente/test_lucee_6_aws_sdk_jar_issue: Trying to debug an issue with Lucee 6 and the AWS Java SDK v2

If you run the repro with Lucee 5.4.7+2, it returns the class software.amazon.awssdk.auth.credentials.AwsBasicCredentials, which is expected.

If you run it with Lucee 6.2.1.77, it returns software.amazon.awssdk.identity.spi.internal.DefaultAwsCredentialsIdentity, and it seems it’s not possible to use the static methods to return an AwsCredentialsIdentity. Consequently, it throws a wrench in authenticating with AWS.

Don’t forget to tell us about your stack!

OS: MacOs Sequoia (15.3.2)
Java Version: AdoptOpenJDK 11.0.11+9
Lucee Version: 6.2.1+77

are you running the same version of the s3 extension with both?

this is the problem yeah?

being able to do these trycf demos with inline components rocks!

It’s not using the S3 extension. In the repro it’s just trying to create an AWS credentials object with the jars in the /lib directory.

I don’t think it’s the same issue that’s being shown in TryCF.

A class is being created in Lucee 6 - it’s just the wrong one.

Here’s a TryCF instance creating the wrong class: TryCF.com

It’s creating software.amazon.awssdk.identity.spi.internal.DefaultAwsCredentialsIdentity

But it should be software.amazon.awssdk.auth.credentials.AwsBasicCredentials

If there’s not something I’m missing here, I’ll fix a bug report with this.

Reported here: LDEV-5457