Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS CLI $PATH Settings

People also ask

How do you check AWS CLI is configured?

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.

Where does AWS CLI look for credentials?

The credentials file is located at ~/. aws/credentials on Linux or macOS, or at C:\Users\ USERNAME \. aws\credentials on Windows. This file can contain the credential details for the default profile and any named profiles.

How do I edit aws config file?

Just type aws configure again (or aws configure --profile <profile_name> to edit a specific profile). If you just confirm the suggested value by hitting enter, it will remain unchanged. You can edit the AWS credentials directly by editing the AWS credentials file on your hard drive.


Here are the three steps to install AWS cli on mac OSX (curl or wget) The third step will set you path correctly

$ curl "https://s3.amazonaws.com/aws-cli/awscli-bundle.zip" -o "awscli-bundle.zip"
$ unzip awscli-bundle.zip
$ sudo ./awscli-bundle/install -i /usr/local/aws -b /usr/local/bin/aws

The other easiest way is to do using homebrew

brew install awscli

If you want the development version you can do

brew install awscli --HEAD

This worked for me (note: change 2.7 to your specific Python version):

export PATH=~/Library/Python/2.7/bin/:$PATH

You'll likely want to add this to the end of your .bash_profile using:

sudo nano ~/.bash_profile

when you run the command: pip3 install awscli --upgrade --user

watch closely where the aws cli tool gets installed, you can see the path on terminal log, in my case I got something like this:

awscli in ./Library/Python/3.6/lib/python/site-packages

Now you should add to your .bash_profile the same path but on the bin folder(removing from the lib path and instead put your bin path) like this:

export PATH=/Users/xuser/Library/Python/3.6/bin/:$PATH


I have used Homebrew to install AWS CLI and I am quite happy with the result. Simply type:

$ brew install awscli

after you have installed brew.

Note, on the AWS CLI installation page there is the following disclaimer:

The awscli package may be available in repositories for other package managers such as APT, yum and Homebrew, but it is not guaranteed to be the latest version.

That said, I have not found this to be a problem, the awscli.rb has been updated quite frequently to match the latest releases.


Update: there is a GitHub issue that suggests that Homebrew should be added as an alternative in the AWS CLI installation instructions. This issue was later closed in favor of this UserVoice feature request.


This happened to me as well and did not want to install brew anymore, because everything was running fine already. I also followed the 'tutorial' on AWS site and had problem in the export path step.

Basically, it added a different python folder as the one, where awscli was downloaded. So instead of export PATH=~/.local/bin:$PATH what they suggested I used a full path from disk: export PATH=/Users/abc/Library/Python/3.6/bin/:$PATH


Try:

PATH=/Users/fr/.local/lib/aws/bin:$PATH 

(put it in .profile file)

Also try to install aws cli with homebrew. It will add it to your path automatically.