Replies: 1 comment 1 reply
-
|
On Windows, “WinError 2: The system cannot find the file specified” from AWS CLI v2 itself is a single EXE, but it still depends on the OS being able to launch helper processes and resolve paths (for example: the Windows shell, credential helpers, or system tools). Different accounts can have different PATH values, different HOME/USERPROFILE, and different AWS config locations. The practical fix steps: Confirm you are truly running the same where aws If they differ, you have multiple AWS CLI installs and the Administrator is running a different one. Confirm the AWS config/credentials locations under the Administrator account: echo %USERPROFILE% If the Administrator profile has no If you use SSO, run the login under the Administrator account and ensure the cache path exists: aws sso login --profile Also check for missing environment variables that some tools assume exist: echo %HOME% If HOME is not set for the Administrator session, set it (or rely on USERPROFILE), because some credential providers and SDK components use HOME to locate config/cache. Finally, if the error is thrown before any AWS API call is made, run with debug to see what file it cannot find: aws sts get-caller-identity --debug Look for the last “executing” or “trying to run” line; it will usually reveal which executable/path is missing in the Administrator context. Summary: This is not an STS problem. It is a Windows user-context/path/config difference. Ensure the Administrator session is using the same |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I encounter a "winerror 2 the system cannot find the file specified" issue when attempting to execute the
sts get-caller-identitycommand with AWS CLI version 2 using the local administrator account. Surprisingly, when I log in via RDP using a domain account on the same EC2 Windows instance, the command executes without any errors. I have tried to reinstall CLI, Python to the latest versions and environmental variables path is fine - Any lead ?Beta Was this translation helpful? Give feedback.
All reactions