Closed
Description
Describe the bug
Encountered interesting issue with GetCredentialsAsync() + "slow" AssumeRoleWithWebIdentityCredentials + tight timeout on calls to our app.
https://github.com/aws/aws-sdk-net/blob/master/sdk/src/Core/Amazon.Runtime/Credentials/RefreshingAWSCredentials.cs#L146
- it acquires global lock
- check if token is expired
- makes a slow network call to CredentialsFromAssumeRoleWithWebIdentityAuthenticationAsync
- release lock
Unfortunately don't have statistics from aws .net sdk, but have from aws nodejs sdk. Assume this slow call is about the same
we tried to implement simple wrapper
that works pretty well, because number of timeout errors goes down after deploying this fix (24th)
Expected Behavior
background refreshing token
Current Behavior
global lock
Reproduction Steps
do not apply
Possible Solution
No response
Additional Information/Context
No response
AWS .NET SDK and/or Package version used
AWSSDK.Core 3.7.8.2
Targeted .NET Platform
.NET 6.0
Operating System and version
aws eks, docker, Debian 11, mcr.microsoft.com/dotnet/aspnet:6.0