Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"bash: aws: command not found" on Windows 7 in Git Bash

I'm trying to use AWS CLI to access CodeCommit. And it's sort of working. I am able to use the aws command in the Windows command prompt. However, when I try to access it using the Git Bash shell, it says

"bash: aws: command not found."

Additionally, when I try to do do a git clone in the Windows command promt, trying to access CodeCommit, it tries to use aws using the credentials helper, which also results in "aws: command not found."

enter image description here

I followed the instructions in the AWS documentation, which suggests some directories to add to the PATH:

https://docs.aws.amazon.com/cli/latest/userguide/awscli-install-windows.html#awscli-install-windows-path

Here's what my PATH variable looks like:

C:\Users\ddrayton\AppData\Local\Programs\Python\Python36\Scripts\;C:\Users\ddrayton\AppData\Local\Programs\Python\Python36\;C:\Windows\System32;;C:\Program Files\Docker Toolbox;C:\Users\ddrayton\MyCurl;%USERPROFILE%\AppData\Local\Programs\Python\Python36\Scripts;C:\Program Files\Amazon\AWSCLI;C:\Program Files (x86)\Amazon\AWSCLI;C:\Users\ddrayton\AppData\Local\Programs\Python\Python36;C:\Users\ddrayton\AppData\Local\Programs\Python\Python36\Scripts

But I'm not sure if it's a PATH problem, since the Windows command prompt has no problem accessing the "aws" command.

Any ideas?

like image 518
David Avatar asked Oct 26 '18 20:10

David


1 Answers

Fixed this by simply installing the AWS CLI again but this time using Git Bash instead of the Windows command prompt.

pip install awscli

If anyone could provide some insight as to why this was necessary, it would be appreciated.

like image 135
David Avatar answered Oct 13 '22 14:10

David