command not found: aws
Your shell cannot find the aws program, so the AWS CLI is not installed properly or is not on your PATH.
Your shell cannot find the aws program, so the AWS CLI is not installed properly or is not on your PATH.
Why it happens
AWS lists four causes: the terminal has not picked up a new PATH (the list of folders the shell searches for programs), the install did not finish, the files lack run permissions on Linux, or the install folder was never added to PATH.
How to fix it
- 1
Step 1
Close and reopen your terminal, then run
aws --version. - 2
Step 2
If it still fails, reinstall the AWS CLI. See install the AWS CLI.
- 3
Step 3
On Linux, fix permissions with
sudo chmod -R 755 /usr/local/aws-cli/(use your install path). On Linux or macOS, addexport PATH=/usr/local/bin:$PATHto your profile script and runsource ~/.bash_profile. - 4
Step 4
On Windows, find the program with
where /R c:\ awsin Command Prompt and add its folder (for examplec:\Program Files\Amazon\AWSCLIV2\) to the PATH environment variable.
export PATH=/usr/local/bin:$PATH
source ~/.bash_profile
aws --version