Com.okta.tools.awscli unable to find program 'aws'

I recently upgraded my AWSCLI msi install and have had issues ever since then using the awscli tool.

I’ve tried uninstalling the AWSCLI and reinstalling as well as removing any trace of the withokta.bat/awscli.bat tools.

I am able to have the awscli perform the 2FA, but when I try to execute the aws command exectuable directly it does not recognize that I have an active session.

Also when trying to run aws commands proxied from the awscli I receive the following error.

C:\Users\jmorrell>java -classpath "C:\Users\jmorrell\.okta\*" com.okta.tools.awscli Exception in thread "main" java.io.IOException: Cannot run program "aws": CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessBuilder.start(Unknown Source) at com.okta.tools.awscli.main(awscli.java:57) Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified at java.lang.ProcessImpl.create(Native Method) at java.lang.ProcessImpl.<init>(Unknown Source) at java.lang.ProcessImpl.start(Unknown Source) ... 2 more

Both the aws and awscli.bat as well as the withokta.bat commands are available to my PATH.

I am working from a Windows 10 machine.

I’m not sure if I’ve posted this in the right spot or not, but any assistance is much appreciated.

I AM NEW TO THE AWS CLI
installed everything by the book for the first time.
AWS --VERSION is aws-cli/1.16.50 Python/3.6.0 Windows/10 botocore/1.12.40
when running: okta-aws test sts get-caller-identity
i get the following response:
Exception in thread “main” java.io.IOException: Cannot run program “aws”: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at com.okta.tools.WithOkta.main(WithOkta.java:38)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)

any thoughts?

I’d suggest posting your questions as issues in the project itself: https://github.com/oktadeveloper/okta-aws-cli-assume-role

This is a community-driven project and not officially supported by Okta. We do our best to support it though!

thanks it seems like pre-req were not met. every thing works awesome now!

Hi,
Can you please share what’s the pre-req is required. I had installed aws-cli version 1.16.86 and downloaded the [okta-aws-cli-assume-role] package.
(https://github.com/oktadeveloper/okta-aws-cli-assume-role)

C:\Users\sthiyagara\Downloads\okta-aws-cli-assume-role-master\bin>java -Djava.util.logging.config.file=“C:\Users\sthiyagara.okta\logging.properties” -classpath “C:\Users\sthiyagara.okta*” com.okta.tools.awscli
Exception in thread “main” java.io.IOException: Cannot run program “aws”: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessBuilder.start(Unknown Source)
at com.okta.tools.awscli.main(awscli.java:57)
Caused by: java.io.IOException: CreateProcess error=2, The system cannot find the file specified
at java.lang.ProcessImpl.create(Native Method)
at java.lang.ProcessImpl.(Unknown Source)
at java.lang.ProcessImpl.start(Unknown Source)
… 2 more

Thanks for your help.

Saravanan

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.