aws-sdk-java-v2 icon indicating copy to clipboard operation
aws-sdk-java-v2 copied to clipboard

How to pass AWSSessionCredentialsProvider in aws-sdk-java-v2

Open dreamerHarshit opened this issue 1 year ago • 0 comments

Describe the bug

In the earlier version of aws java SDK, we used to connect with aws s3 using the following code snippet

AmazonS3EncryptionClientV2Builder.standard(). .withCredentials(<Object of AWSSessionCredentialsProvider>) .withEncryptionMaterialsProvider() .withKmsClient() .withEndpointConfiguration().build

Expected Behavior

As it used to support AWSSessionCredentialsProvider in earlier versions so was expecting it to work with new version as well or if there is any alternative of this?

Current Behavior

Getting error that credentialProvider() in aws-sdk-java-v2 does not take AwsSessionCredentialsProvider as input

Reproduction Steps

NA

Possible Solution

No response

Additional Information/Context

No response

AWS Java SDK version used

2.25.10

JDK version used

java17

Operating System and version

rhel8

dreamerHarshit avatar Jun 26 '24 06:06 dreamerHarshit