Install the AWS Command Line Interface on Linux

You can install the AWS Command Line Interface and its dependencies on most Linux distributions with pip, a package manager for Python.

Important

The awscli package is available in repositories for other package managers such as APT and yum, but it is not guaranteed to be the latest version unless you get it from pip or use the bundled installer

If you already have pip, follow the instructions in the main installation topic. Run pip --version to see if your version of Linux already includes Python and pip.

$ pip --version

If you don't have pip, check to see which version of Python is installed.

$ python --version

or

$ python3 --version

If you don't have Python 2 version 2.6.5+ or Python 3 version 3.3+, install Python. Otherwise, install pip and the AWS CLI.

Installing Pip

If you don't have pip, install pip with the script provided by the Python Packaging Authority.

To install pip

  1. Download the installation script from pypa.io:

    $ curl -O https://bootstrap.pypa.io/get-pip.py

    The script downloads and installs the latest version of pip and another required package named setuptools.

  2. Run the script with Python:

    $ python get-pip.py --user
  3. Add the executable path to your PATH variable: ~/.local/bin

    To modify your PATH variable (Linux, macOS, or Unix)

    1. Find your shell's profile script in your user folder. If you are not sure which shell you have, run echo $SHELL.

      $ ls -a ~
      . .. .bash_logout .bash_profile .bashrc Desktop Documents Downloads
      • Bash.bash_profile, .profile, or .bash_login.

      • Zsh.zshrc

      • Tcsh.tcshrc, .cshrc or .login.

    2. Add an export command to your profile script.

      export PATH=~/.local/bin:$PATH

      This command adds a path, ~/.local/bin in this example, to the current PATH variable.

    3. Load the profile into your current session.

      $ source ~/.bash_profile
  4. Verify that pip is installed correctly.

    $ pip --version
    pip 8.1.2 from ~/.local/lib/python3.4/site-packages (python 3.4)

Installing the AWS CLI with Pip

Use pip to install the AWS CLI.

$ pip install awscli --upgrade --user

Verify that the AWS CLI installed correctly.

$ aws --version
aws-cli/1.11.84 Python/3.6.2 Linux/4.4.0-59-generic botocore/1.5.47

If you get an error, see Troubleshooting AWS CLI Errors.

To upgrade to the latest version, run the installation command again:

$ pip install awscli --upgrade --user

Adding the AWS CLI Executable to your Command Line Path

After installing with pip, you may need to add the aws executable to your OS's PATH environment variable.

Example AWS CLI install location - Linux with pip (user mode)

~/.local/bin

If you didn't install in user mode, the executable might be in the bin folder of your Python installation. If you don't know where Python is installed, run which python.

$ which python
/usr/local/bin/python

The output may be the path to a symlink, not the actual executable. Run ls -al to see where it points.

$ ls -al /usr/local/bin/python
~/.local/Python/3.6/bin/python3.6

To modify your PATH variable (Linux, macOS, or Unix)

  1. Find your shell's profile script in your user folder. If you are not sure which shell you have, run echo $SHELL.

    $ ls -a ~
    . .. .bash_logout .bash_profile .bashrc Desktop Documents Downloads
    • Bash.bash_profile, .profile, or .bash_login.

    • Zsh.zshrc

    • Tcsh.tcshrc, .cshrc or .login.

  2. Add an export command to your profile script.

    export PATH=~/.local/bin:$PATH

    This command adds a path, ~/.local/bin in this example, to the current PATH variable.

  3. Load the profile into your current session.

    $ source ~/.bash_profile

Install the AWS Command Line Interface on Linux的更多相关文章

  1. vue-cli 脚手架 Command Line Interface

    mac sudo npm install -g nrm sudo npm config -g set unsafe-perm sudo npm install webpack@3.0.0 -g sud ...

  2. MYSQL5.7脚本运行时出现[Warning] Using a password on the command line interface can be insecure

    MYSQL版本:5.7 在写linux脚本执行MYSQL命令的时候,如果使用 MYSQL="mysql -hlocalhost -P3306 -uroot -p666666" 登陆 ...

  3. 【mysql报错】MySQL5.7.27报错“[Warning] Using a password on the command line interface can be insecure.”

    MySQL5.7.27报错“[Warning] Using a password on the command line interface can be insecure.”在命令行使用密码不安全警 ...

  4. MySQL 5.6 Warning: Using a password on the command line interface can be insecure

    MySQL 5.6 在命令行输入密码,就会提示这些安全警告信息. Warning: Using a password on the command line interface can be inse ...

  5. MySQL 5.6 警告信息 command line interface can be insecure 修复

    在命令行输入密码,就会提示这些安全警告信息. Warning: Using a password on the command line interface can be insecure.   注: ...

  6. atprogram.exe : Atmel Studio Command Line Interface

    C:\Program Files\Atmel\Atmel Studio 6.1\atbackend\atprogram.exe No command specified.Atmel Studio Co ...

  7. Centos下_MysqL5.7在使用mysqldump命令备份数据库报错:mysqldump: [Warning] Using a password on the command line interface can be insecure.

    在阿里云服务器增加一个shell脚本定时备份数据库脚本执行任务时,测试性的执行了备份命令,如下 [root@iZ2ze503xw2q1fftv5rhboZ mysql_bak]# /usr/local ...

  8. Warning: Using a password on the command line interface can be insecure.

    [root@qttc ~]# /usr/local/mysql/bin/mysqldump  -uroot -proot db > bak.sqlWarning: Using a passwor ...

  9. mysql 备份报错mysqldump: [Warning] Using a password on the command line interface can be insecure.

    -------------------------------------------------------------------------------- mysql 备份报错mysqldump ...

随机推荐

  1. HyperLedger Fabric 1.4 超级账本组织(5.3)

    超级账本组织分为TSC(技术指导委员会).Governing Board(董事会成员).LF Staffs(工作人员)三个组织,组织架构图如下: TSC:技术指导委会员,主导社区的开发工作,下设多个工 ...

  2. CSS3不一样的下拉选择框

    本例中包含两个下拉选择框的动画示例,本例中并未使用select标签.本例中第一个案例也可用于标题.导航栏等位置. 案例一: html布局 <div class="content&quo ...

  3. elasticsearch 拼音+ik分词,spring data elasticsearch 拼音分词

    elasticsearch 自定义分词器 安装拼音分词器.ik分词器 拼音分词器: https://github.com/medcl/elasticsearch-analysis-pinyin/rel ...

  4. Python的文件输入输出,如何追加内容,读取内容,添加内容

    python主要的文件打开的几种访问模式 模式可以为读模式('r').写模式('w')或追加模式('a'),当然还有rb.wb.ab.r+.w+.a+.rb+.wb+.ab+,然而实际从代码上我也没看 ...

  5. Unity3d工具方法小集

    1.获取垂直水平方向上的输入: float moveHorizontal = Input.GetAxis("Horizontal"); float moveVertical = I ...

  6. Linux-Shell脚本编程-学习-1-Linux基本命令

    在学习Linux-Shell脚本编程之前,我们需要学习一定的Linux基本命令,不然在后面学习Shell脚本编程的的时候,我们就呵呵了. 我学习所用的系统是Ubuntu 16.04版本 也没有什么规则 ...

  7. 梳理 Opengl ES 3.0 (一)宏观着眼

    Opengl ES 可以理解为是在嵌入式设备上工作的一层用于处理图形显示的软件,是Opengl 的缩水版本. 下图是它的工作流程示意图: 注意图中手机左边的EGL Layer Opengl ES是跨平 ...

  8. VS2013 启用avalon 智能提示 Intelligence

    第一步: 关闭VS2013. 第二步: 进入目录: C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Packages\schem ...

  9. Go基础篇【第2篇】: 内置库模块 fmt

    fmt官方文档说明:https://studygolang.com/pkgdoc import "fmt" mt包实现了类似C语言printf和scanf的格式化I/O.格式化动作 ...

  10. 第十一次ScrumMeeting会议

    第十一次ScrumMeeting 时间:2017/11/18 4:00-4:30 地点:主203 人员:全体人员 照片: 工作情况 名字 今日计划 明天的工作 遇到的困难 蔡帜 讨论策划详情\确定WB ...