docs.aws.amazon.com

This topic describes how to install or update the latest release of the AWS Command Line Interface (AWS CLI) on supported operating systems. For information on the latest releases of AWS CLI, see the AWS CLI version 2 Changelog on GitHub.

To install a past release of the AWS CLI, see Installing past releases of the AWS CLI version 2. For uninstall instructions, see Uninstalling the AWS CLI version 2.

Topics

AWS CLI install instructions

For installation instructions, expand the section for your operating system.

Install requirements

  • You must be able to extract or "unzip" the downloaded package. If your operating system doesn't have the built-in unzip command, use an equivalent.

  • The AWS CLI uses glibc, groff, and less. These are included by default in most major distributions of Linux.

  • We support the AWS CLI on 64-bit versions of recent distributions of CentOS, Fedora, Ubuntu, Amazon Linux 1, Amazon Linux 2, Amazon Linux 2023, and Linux ARM.

  • Because AWS doesn't maintain third-party repositories other than snap, we can’t guarantee that they contain the latest version of the AWS CLI.

Install the AWS CLI

Warning

If this is your first time updating on Amazon Linux, to install the latest version of the AWS CLI, you must uninstall the pre-installed yum version using the following command:

$ sudo yum remove awscli

After the yum installation of the AWS CLI is removed, follow the below Linux install instructions.

You can install the AWS CLI by using one of the following methods:

  • The install script is the recommended way to install the AWS CLI. To update the AWS CLI, see AWS CLI update instructions.

  • The command line installer is a good option for version control because you can specify the version to install. This option does not auto-update; to update, see AWS CLI update instructions.

  • The officially supported snap package is a good option to always have the latest version of the AWS CLI as snap packages automatically refresh. There is no built-in support for selecting minor versions of AWS CLI and therefore is not an optimal install method if your team needs to pin versions.

Install requirements

  • We support the AWS CLI on macOS versions 11 and later. For more information, see macOS support policy updates for the AWS CLI v2 on the AWS Developer Tools Blog.

  • Because AWS doesn't maintain third-party repositories, we can’t guarantee that they contain the latest version of the AWS CLI.

macOS version support matrix

AWS CLI version Supported macOS version
2.21.0 – current 11+
2.17.0 –2.20.0 10.15+
2.0.0 – 2.16.12 10.14 and below

Install the AWS CLI

You can install the AWS CLI on macOS in the following ways. The install script is the recommended method. To update an existing installation, see AWS CLI update instructions.

Install requirements

  • We support the AWS CLI on Microsoft-supported versions of 64-bit Windows.

  • Admin rights to install software (if installing for all users).

Install the AWS CLI

You can install the AWS CLI on Windows for all users (requires admin rights) or for only the current user (no admin rights required). The install script is the recommended method. We update the AWS CLI regularly; to see the latest version, see the AWS CLI version 2 Changelog on GitHub. To update an existing installation, see AWS CLI update instructions.

AWS CLI update instructions

If you installed the AWS CLI using the install script, an official installer (the Linux command line installer, the macOS PKG installer, or the Windows MSI installer), you can update to the latest version by running the following command.

$ aws update

If you installed the AWS CLI for all users, run aws update from an elevated shell (sudo on Linux and macOS, or an Administrator PowerShell prompt on Windows). aws update preserves whether your existing installation is for all users or the current user.

Troubleshooting AWS CLI install and uninstall errors

If you come across issues after installing or uninstalling the AWS CLI, see Troubleshooting errors for the AWS CLI for troubleshooting steps. For the most relevant troubleshooting steps, see Command not found errors, The "aws --version" command returns a different version than you installed, and The "aws --version" command returns a version after uninstalling the AWS CLI.

Next steps

After you successfully install the AWS CLI, you can safely delete your downloaded installer files. After completing the steps in Prerequisites to use the AWS CLI version 2 and installing the AWS CLI, you should perform a Setting up the AWS CLI.

Read the original on docs.aws.amazon.com ↗