Skip to content

Unable to use ContainerCredentialsProvider CredentialsProvider for Multilang project #261

@stabl-gjn

Description

@stabl-gjn

This is more a issue with the dependencies (specifically awssdk-java-v2) than with amazon-kinesis-client-python itself but as this project defines what version of dependencies to use and the issue has already been resolved upstream, i created the ticket here.


When setting ContainerCredentialsProvider as AwsCredentialsProvider in the properties file passed to KCL (v3.0.1) it fails with:

Attempting to construct class software.amazon.awssdk.auth.credentials.ContainerCredentialsProvider
Unable to construct any provider with name ContainerCredentialsProvider

This appears to be a oversight in awssdk-java-v2, as the ContainerCredentialsProvider does not contain a create function for the version this project is using (v2.25.64;

<awssdk.version>2.25.64</awssdk.version>
).

Code in awssdk-java-v2 v2.25.64:
https://github.com/aws/aws-sdk-java-v2/blob/76d2819f93a21c7600e0e53e3f13345ade1c8387/core/auth/src/main/java/software/amazon/awssdk/auth/credentials/ContainerCredentialsProvider.java

The function has been later introduced with: aws/aws-sdk-java-v2@0043e38


The multilang implementation relies on this function to be present if no string only (or blank) constructor is available on the class:

https://github.com/awslabs/amazon-kinesis-client/blob/4492e1e206198f9d01af3c0a954ffe64907e8b11/amazon-kinesis-client-multilang/src/main/java/software/amazon/kinesis/multilang/config/AwsCredentialsProviderPropertyValueDecoder.java#L83-L105

As the constructor expects a BuilderImpl it will probably not be called (only called with string args) and a create does not exist for the specific version of awssdk-java-v2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions