-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[Bug] EKSCTL_ENABLE_CREDENTIAL_CACHE=1 does not work in 0.165.0 #7404
Comments
Hi @koooge - in Given the error you're facing, I'm guessing your credentials would have expired in less than 30 mins from when you ran the command. Therefore, the sdk tries to refresh the credentials but can't do so using the MFA token as it's no longer valid? |
Hi @TiberiuGC , Yeah. the created expiration is too soon.
|
I have a similar issue. I am already logged in and have a valid session token in ~/.aws/credentials. Everytime I use |
Same issue for me in 165/166. Falling back to 160 fixed it. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
Let me remove the stale label. |
I can confirm this issue on 171, and for me even with the cache disabled MFA isn't working. The only way I was able to connect is by modifying the expiration |
I can confirm the same issue with Here in the code it is set to refresh the creds 30 mins before they expire: https://github.com/eksctl-io/eksctl/blob/main/pkg/eks/apiv2.go#L83 So either need to increase sessions duration to 1 hour, which is default for assumable role. Or decrease |
@vutny thanks for the explanation. I think increasing sessions duration makes sense, would you like to open a PR for it? |
Sounds good, @yuxiang-zhang ! Submitted PR #7626 |
I verified EKSCTL_ENABLE_CREDENTIAL_CACHE worked in 0.173.0. Thank you @vutny ! |
Hi there,
What were you trying to accomplish?
EKSCTL_ENABLE_CREDENTIAL_CACHE=1 does not work to cache MFA token in 0.165.0. It worked in 0.160.0.
What happened?
Actually it created the cache file. But the
expiration
is set at just that point.How to reproduce it?
Logs
Anything else we need to know?
As a workaround, I manually edited the
expiration
in~/.eksctl/cache/credentials.yaml
to a future datetime and it worked.Versions
The text was updated successfully, but these errors were encountered: