Replies: 1 comment 1 reply
-
|
AWS CLI does not run token checks automatically on terminal startup by itself. The slowdown is caused by your shell configuration (prompt/rc scripts) running an AWS command (often To make it lazy, you need to stop running AWS CLI at startup and instead read local cache state (fast) or only call AWS when you actually run an AWS command. Fast, local “is SSO token still valid?” check: AWS SSO tokens are cached as JSON files under: ~/.aws/sso/cache/ Those files contain an So, for your prompt/startup logic:
Also, if you currently run a login check on every prompt render (PS1), change it to run at most once per N seconds (cache the result in a temp file) to avoid repeated AWS calls. Summary: The fix is not in AWS CLI; it’s in your shell startup/prompt scripts. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Whenever I open up a new terminal window the aws cli checks the validity of the access tokens. This process delay the terminal start. Is there any way to lazily check the sso token expiry when needed.
Beta Was this translation helpful? Give feedback.
All reactions