AWS: avoid static global credentials provider which doesn't play well with lifecycle management#8677
Conversation
…tCredentialsProvider.create()` to avoid sharing the same credentials provider across multiple clients
|
@Kontinuation thx for the fix. LGTM. I updated the subject. will leave it for a couple of days for others to review. |
dramaticlly
left a comment
There was a problem hiding this comment.
thank you for the fix
There was a problem hiding this comment.
I think this is a reasonable fix for the problem at hand. Thanks @Kontinuation !
The only aspect I wonder about is how much benefit we even get from sharing HTTP clients between different service clients (in this case, between STS and S3). The main benefit of sharing HTTP clients is connection pooling; S3 and STS have different endpoints thus sharing HTTP clients between S3 and STS clients won't add any value.
Anyways that's orthogonal to the problem at hand, but just happened to surface to me as part of the debugging of this problem (again thanks @Kontinuation for the in depth analysis of the problem)
…provider for each client
|
thanks @Kontinuation for the root cause analysis and the fix. Thanks @dramaticlly @amogh-jahagirdar @danielcweeks for reviews |
… with lifecycle management (#8677)
… with lifecycle management (#8677) (#8843) Co-authored-by: Kristin Cowalcijk <[email protected]>
… with lifecycle management (apache#8677)
Fixes #8601
It replaces
DefaultCredentialsProvider.create()withDefaultCredentialsProvider.builder().build()to avoid sharing the same credentials provider across multiple clients.This PR changes 3 places calling
DefaultCredentialsProvider.create(), and adds one test forAwsCredentialsProvider.credentialsProvider. The other two are deprecated so no tests were added for them.