aws-toolkit-azure-devops icon indicating copy to clipboard operation
aws-toolkit-azure-devops copied to clipboard

AWS is not recognised as an internal or external command

Open waseemkhan91 opened this issue 7 years ago • 8 comments

I am able to execute the command aws --version in command prompt but when I try to do the same using VSTS Command Prompt task I get the above error.

Any reasons why ?

waseemkhan91 avatar Oct 22 '18 16:10 waseemkhan91

My theory is that the AWS CLI is installed as a per-user item so from your original command prompt it's available on path etc.

When run under VSTS, the command prompt task is running under a different (possibly system) account which doesn't have the relevant files on PATH.

stevejroberts avatar Oct 22 '18 20:10 stevejroberts

I have had to restart the machine when I installed it in the past to get VSTS to recognize it. Restarting the VSTS service may work too.

Others have had the same experience: https://github.com/aws/aws-vsts-tools/issues/4#issuecomment-419418328

JeffRausch avatar Oct 22 '18 20:10 JeffRausch

My theory is that the AWS CLI is installed as a per-user item so from your original command prompt it's available on path etc.

When run under VSTS, the command prompt task is running under a different (possibly system) account which doesn't have the relevant files on PATH.

@steveataws is there a workaround for this ?

waseemkhan91 avatar Oct 23 '18 07:10 waseemkhan91

I have had to restart the machine when I installed it in the past to get VSTS to recognize it. Restarting the VSTS service may work too.

Others have had the same experience: #4 (comment)

@JeffRausch i've restarted it a few times now and still get the same error. I tried using the AWS CLI task and get the error that aws is not installed on this machine.

waseemkhan91 avatar Oct 23 '18 10:10 waseemkhan91

There is similar problem in windows. -- installed AWSCLI and I put the path in an environment variable and I tried again but it didn't work. --

otnansirk avatar Mar 14 '19 04:03 otnansirk

Hi..I tried to check aws --version but I am facing this issue : import awscli.clidriver ModuleNotFoundError: No module named 'awscli' Can anyone help me to know why iam facing this issue

Pavana-k avatar Jan 20 '20 12:01 Pavana-k

I am facing the same issue. When i try using command prompt aws commands just work but with generic account it doesn't recognize the command. By any chance anyone got the resolution?

shankysharma86 avatar Jul 10 '20 18:07 shankysharma86

Same issue, it gives an error even after checking version. Why is there no NPM package??

JCasper121 avatar Dec 10 '20 10:12 JCasper121