-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Intermittent failure for getting IAM credential in k8s pod with Kube2IAM role #2421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Currently the SDK does not retry IMDS credentials fetching, you can add a custom retry logic. You can also enable async refreshing of IMDS credentials and see if the condition improve: https://docs.aws.amazon.com/sdk-for-java/v1/developer-guide/setup-credentials.html#refresh-credentials |
Thanks @debora-ito for response. I am new here so just trying understand:
Can you provide me some favour to understand the thread closing statement mentioned in the documentation. I have a spring boot web app and creating DynamoDb client as singleton bean on startup. After adding InstanceProfileCredentialsProvider Could you check below code snippet, based on my understanding:
Changed: With the use of
Please confirm does above making sense and correct to you? |
Yes it's possible, you can set a RetryPolicy in the ClientConfiguration.
This connection timeout is not configurable. We have a feature request to make it configurable, you can add your thumbs up: #2365 The code seems good, calling close() after you're done with the credentials provider would release the background thread so your application can have more resources if needed. |
Thanks @debora-ito 👍 |
Hi! I talked about this issue and described our custom solution in this article. |
Uh oh!
There was an error while loading. Please reload this page.
Description
Observed Intermittent failure for getting IAM credential in k8s pod with Kube2IAM role
StackTrace:
Environment
The text was updated successfully, but these errors were encountered: