Danny Cranmer created FLINK-19716:
-------------------------------------
Summary: [Kinesis][EFO] Unable to use Assume Role with EFO record publisher
Key: FLINK-19716
URL:
https://issues.apache.org/jira/browse/FLINK-19716 Project: Flink
Issue Type: Bug
Components: Connectors / Kinesis
Reporter: Danny Cranmer
Fix For: 1.12.0
*Reproduction Steps*
* Setup an application to consume from a Kinesis Stream
* Use ASSUME_ROLE credential provider
{code:java}
consumerConfig.setProperty(AWSConfigConstants.AWS_CREDENTIALS_PROVIDER, ASSUME_ROLE.name());
consumerConfig.setProperty(AWSConfigConstants.AWS_ROLE_ARN, "<role-arn>");
consumerConfig.setProperty(AWSConfigConstants.AWS_ROLE_SESSION_NAME, "test-efo");
{code}
*Expected Result*
* Consumer is able to authorise and consume from the stream
*Actual Result*
* The following error is thrown (full stack attached)
** Caused by: org.apache.flink.kinesis.shaded.software.amazon.awssdk.core.exception.SdkClientException: Unable to load an HTTP implementation from any provider in the chain. You must declare a dependency on an appropriate HTTP implementation or pass in an SdkHttpClient explicitly to the client builder.
*Diagnosis*
This issue occurs because Assume Role credential provider requires a Sync HTTP Client. The Apache HTTP Client is on the classpath but it is not detected due to the shading relocation. It is looking for:
- {{org.apache.flink.kinesis.shaded.software.amazon.awssdk.http.SdkHttpService}}
However the service manifest is defining:
- {{software.amazon.awssdk.http.SdkHttpService}}
*Solution*
* Add a service manifest such that the shaded HTTP client is used
* Also needed to update the HTTP client/core version due to incompatibilities
*Testing*
Tested using EFO and POLLING record consumer
--
This message was sent by Atlassian Jira
(v8.3.4#803005)