AWS CLI $PATH Settings

后端 未结 14 2204
悲&欢浪女
悲&欢浪女 2021-01-30 04:50

I am following the AWS CLI Setup guide. I have managed to successfully install the tool on my Mac OS X terminal with the following output:

Running cmd: /usr/bin/         


        
相关标签:
14条回答
  • 2021-01-30 05:13

    I ended up doing the same as Piotr and it's good to understand how to update your path without 3rd party software. However as 3rd party software goes Homebrew is pretty awesome and its a good thing to use it for keeping your dependency symlinks controlled in one place. de facto pkg mgr on mac.

    0 讨论(0)
  • 2021-01-30 05:16

    Make sure python is installed globally, The steps are like this:

    On AWS side:

    Go to amazon AWS center -> Services -> Identity and Access Management (IAM) -> Users -> find your User and click on it -> pick Security Credentials tab -> create Access Key

    Installation: On command line / bash

    curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
    unzip awscliv2.zip
    sudo ./aws/install
    

    Optional: if aws version is not found yet ,set up the aws path on your bash profile.

    vim ~/.bash_profile
    #paste this line
    PATH=$PATH:/usr/local/bin/aws
    

    Configuration:(Final Step) Configure your credentials as following

    aws configure
    

    Fill in the properties you got from aws website and connect your account. attaching an example for this step.

    AWS Access Key ID [None]: abcd

    AWS Secret Access Key [None]: zyx123!@#

    Default region> name [None]: us-east-1

    Default output format [None]: json

    Good Luck!

    0 讨论(0)
  • 2021-01-30 05:18

    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
    
    0 讨论(0)
  • 2021-01-30 05:21

    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.

    0 讨论(0)
  • 2021-01-30 05:23

    I've just had the same error and I was able to solve it by adding the following line to my .bash_profile file:

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

    Please check the version of Python as it may be slightly different on your system. This avoids adding your username folder to the .bash_profile file.

    0 讨论(0)
  • 2021-01-30 05:25

    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
    
    0 讨论(0)
提交回复
热议问题