Skip to content

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

@dreamerHarshit

Description

@dreamerHarshit

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugThis issue is a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions