Open vineetu opened 1 week ago
Hi @vineetu, I'm sorry you're seeing socket timeout exceptions connecting to STS. I'm unable to reproduce this on a regular (i.e., non-Kubernetes) EC2 instance. I'm working on setting up EKS now but, in the meantime, can you please provide some additional info for debugging:
Describe the bug
I’m encountering a SocketTimeoutException when using the AWS Kotlin SDK to connect to DynamoDB in a Kubernetes environment. The exception occurs during the SSL handshake when the StsWebIdentityCredentialsProvider attempts to retrieve credentials.
When I do the same using the java alternative software.amazon.awssdk.auth.credentials.WebIdentityTokenFileCredentialsProvider. It works just fine.
Here is the stack
Regression Issue
Expected behavior
The AWS Kotlin SDK should successfully use the StsWebIdentityCredentialsProvider to obtain temporary credentials and communicate with AWS services without encountering a socket timeout.
Current behavior
There is a socket timeout and the application throws a SocketTimeoutException during the SSL handshake when attempting to retrieve credentials using the StsWebIdentityCredentialsProvider.
Steps to Reproduce
dynamoDB = DynamoDbClient { region = dynamoConfig.region credentialsProvider = StsWebIdentityCredentialsProvider.fromEnvironment(roleArn = "arn", roleSessionName = "name", webIdentityTokenFilePath= "token-location", region = "us-west-2") }
Possible Solution
No response
Context
I am no longer able to call dynamo-db. I am moving my service from java to kotlin and wanted to use the kotlin sdk. Now this is blocker.
AWS SDK for Kotlin version
1.3.57
Platform (JVM/JS/Native)
JVM
Operating system and version
runs in an kubernetes pod in an ec2 container