-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Latency issues w/ STS credentials #4385
Comments
This can be addressed in one of three ways:
|
I've put together some code based on Rokt's post https://github.com/marselester/awscreds. Maybe it will be useful to someone as a starting point. |
Hi all, This is a pretty old issue ,and I see that there are number of suggestions / workaround on the thread. Thanks, |
Hi Ran, unfortunately I no longer can check if the issue persists. |
Comments on closed issues are hard for our team to see. |
Describe the bug
EKS uses the token based credentials to exchange the token w/ the key/secret pair. We were seeing random high latency of up to 5 seconds when calling dyanmodb.
We found the solution here.
https://www.rokt.com/engineering-blog/improving-app-latency-eks/
Summary of issues.
Expected Behavior
STS should use a goroutine to refresh credentials in the background so queries don't pay for the latency caused by a refresh.
STS should use the region in the hostname. e.g
sts.us-east-1.amazonaws.com
instead ofsts.amazonaws.com
.Current Behavior
STS token refresh happens inline w/ the request
STS uses
sts.amazonaws.com
to refresh the token without regard to the region.Reproduction Steps
Use STS enable EKS. Do a poll request to dynamo or some other service. During refreshes, there will be latency issues.
Possible Solution
https://www.rokt.com/engineering-blog/improving-app-latency-eks/
Additional Information/Context
No response
SDK version used
v1.40.54
Environment details (Version of Go (
go version
)? OS name and version, etc.)go version go1.17.9 linux/amd64/Linux social-service-api-develop-7f4f4bd4cb-lhjfg 5.4.181-99.354.amzn2.x86_64 #1 SMP Wed Mar 2 18:50:46 UTC 2022 x86_64 Linux
The text was updated successfully, but these errors were encountered: