Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Setting up the path so AWS cli works properly

I installed AWSCLI by using:

pip install --upgrade --user awscli

Now if I type aws configure in the cmd I get: 'aws' is not recognized as an internal or external command...

I'm pretty sure the path needs to be set correctly. I know how to go into the environment variables to set the path, but I don't know WHAT to set the path to because I don't see where awscli is installed. By the way, I already have boto3 installed and I'm able to import that just fine.

I should also mention I'm setting this up in windows.

like image 956
J4ce Avatar asked Feb 07 '17 21:02

J4ce


People also ask

How do you check if AWS CLI is configured correctly?

Use the describe-configuration-recorder-status command to check that the AWS Config has started recording the configurations of the supported AWS resources existing in your account. The recorded configurations are delivered to the specified delivery channel.

Why my AWS CLI is not working?

If the aws command cannot be found after first installing or updating the AWS CLI, you might need to restart your terminal for it to recognize any PATH updates. If the aws command cannot be found after first installing or updating the AWS CLI, it might not have been fully installed.

Which command is used to configure AWS CLI?

Quick configuration with aws configure For general use, the aws configure command is the fastest way to set up your AWS CLI installation. When you enter this command, the AWS CLI prompts you for four pieces of information: Access key ID. Secret access key.

Where is AWS CLI config?

You can configure a named profile using the --profile argument. If your config file does not exist (the default location is ~/. aws/config ), the AWS CLI will create it for you.


4 Answers

Hi I just had the same problem, and I managed to solve this!

I'm using python 3.7.0 and pip version 18.

I installed awscli using

pip install --upgrade --user awscli

but it is not added in PATH, and I have no idea how to find it.But when I decided to delete it, running

pip uninstall awscli

it told me that

Uninstalling awscli-1.15.65:
Would remove:
    c:\users\riz\appdata\roaming\python\python37\scripts\aws
    c:\users\riz\appdata\roaming\python\python37\scripts\aws.cmd
    c:\users\riz\appdata\roaming\python\python37\scripts\aws_bash_completer
    c:\users\riz\appdata\roaming\python\python37\scripts\aws_completer
    c:\users\riz\appdata\roaming\python\python37\scripts\aws_zsh_completer.sh
    c:\users\riz\appdata\roaming\python\python37\site-packages\awscli-1.15.65.dist-info\*
    c:\users\riz\appdata\roaming\python\python37\site-packages\awscli\*

So I know the file was installed in

c:\users\riz\appdata\roaming\python\python37\scripts\aws

you just need to add this to PATH! Good Luck!

like image 155
Kevin Mao Avatar answered Oct 27 '22 18:10

Kevin Mao


I had the same problem. http://docs.aws.amazon.com/cli/latest/userguide/awscli-install-windows.html says that you should set the path to %USERPROFILE%\AppData\Local\Programs\Python\Python36\Scripts if you use pip, but the path for me was actually %USERPROFILE%\AppData\Roaming\Python\Scripts. You can search for aws.cmd to find where it was actually installed. Just add that directory to your path environmental variable. I'm using Python 2.7 so that might explain the difference.

like image 7
Dwayne Driskill Avatar answered Oct 27 '22 16:10

Dwayne Driskill


There are two ways to do it: 1. upgrade existing aws-cli 2. do a clean install

here are the steps to do a clean install:

remove any existing aws-cli rpms's: pip remove aws-cli

curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"

pip -y install unzip

unzip awscli-bundle.zip

./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

aws --version

like image 1
Aty Avatar answered Oct 27 '22 18:10

Aty


I had the same problem when trying to install awscli on windows 10 x64. I was installing awscli using command below (which recommended from the following guide (Installing the AWS CLI):

pip3 install awscli --upgrade --user

But after I run that command, I still can't run aws --version command. It said that aws is not recognized. So after some triage, the only works and easy way to install awscli is download the awscli is using the msi installer provided by Amazon itself:

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

Just run, install, no extra configuration needed, restart your command line, and it works like charm.

like image 1
yodist Avatar answered Oct 27 '22 16:10

yodist