awslabs / awslabs/amazon-kinesis-client-python
Unable to use ContainerCredentialsProvider CredentialsProvider for Multilang project
- Dominant language
- Python
- Stars
- 377
- Forks
- 228
- PR merge metrics
- No merged PRs in 30d
Description
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`; https://github.com/awslabs/amazon-kinesis-client-python/blob/76a1e3f43e96d505990cbad1a0077c77b9b78cba/pom.xml#L5).
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:
---
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.
Contributor guide
Assessment
This issue has not been assessed yet.