Building and installing the AWS CLI from source (original) (raw)

This topic describes how to install or update from source to 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.

Topics

Why build from source?

The AWS CLI is available as pre-built installers for most platforms and environments as well as a Docker image.

Generally, these installers provide coverage for most use-cases. The instructions for installing from source are to help with the use-cases our installers do not cover. Some of these use-cases include the following:

Quicksteps

Note

All code examples are assumed to run from the root of the source directory.

To build and install the AWS CLI from source, follow the steps in this section. The AWS CLI leverages GNU Autotools to install from source. In the simplest case, the AWS CLI can be installed from source by running the default example commands from the root of the AWS CLI GitHub repository.

  1. Setup all requirements for your environment. This includes being able to run GNU Autotools generated files and Python 3.8 or later is installed.
  2. In your terminal, navigate to the top level of the AWS CLI source folder and run the ./configure command. This command checks the system for all required dependencies and generates a Makefile for building and installing the AWS CLI based on detected and specified configurations.
    Linux and macOS
    The following ./configure command example sets the build configuration for the AWS CLI using default settings.
$ ./configure  

Windows PowerShell
Before running any commands calling MSYS2, you must preserve your current working directory:

PS C:\> $env:CHERE_INVOKING = 'yes'  

Then use the following ./configure command example to set the build configuration for the AWS CLI using your local path to your Python executable, installing to C:\Program Files\AWSCLI, and downloading all dependencies.

PS C:\> C:\msys64\usr\bin\bash  -lc " PYTHON='C:\path\to\python.exe' ./configure --prefix='C:\Program Files\AWSCLI' --with-download-deps "  

For details, available configuration options, and default setting information, see the Step 2: Configuring the AWS CLI source installation section. 3. Run the make command. This command builds the AWS CLI according to your configuration settings.
The following make command example builds with default options using your existing ./configure settings.
Linux and macOS

$ make  

Windows PowerShell

PS C:\> C:\msys64\usr\bin\bash -lc "make"  

For details and available build options, see the Step 3: Building the AWS CLI section. 4. Run the make install command. This command installs your built AWS CLI to the configured location on your system.
The following make install command example installs your built AWS CLI and creates symlinks in your configured locations using default command settings.
Linux and macOS

$ make install  

Windows PowerShell

PS C:\> C:\msys64\usr\bin\bash -lc "make install"  

After installing, add the path to the AWS CLI using the following:

PS C:\> $Env:PATH +=";C:\Program Files\AWSCLI\bin\"  

For details and available install options, see the Step 4: Installing the AWS CLI section. 5. Confirm the AWS CLI successfully installed using the following command:

$ aws --version  
aws-cli/2.25.11 Python/3.11.6 Windows/10 exe/AMD64 prompt/off  

For troubleshooting steps for install errors see the Troubleshooting AWS CLI install and uninstall errors section.

Step 1: Setup all requirements

To build the AWS CLI from source you need the following completed beforehand:

Note

All code examples are assumed to run from the root of the source directory.

  1. Download the AWS CLI source by either forking the AWS CLI GitHub repository or downloading the source tarball. The instructions is one of the following:
    $ curl -o awscli.tar.gz https://awscli.amazonaws.com/awscli.tar.gz  
    $ tar -xzf awscli.tar.gz  

    (Optional) Verifying the integrity of your downloaded zip file by completing the following steps:
    1. You can use the following steps to verify the signatures by using the GnuPG tool.
    The AWS CLI installer package .zip files are cryptographically signed using PGP signatures. If there is any damage or alteration of the files, this verification fails and you should not proceed with installation.
    2. Download and install the gpg command using your package manager. For more information about GnuPG, see the GnuPG website.
    3. To create the public key file, create a text file and paste in the following text.
    -----BEGIN PGP PUBLIC KEY BLOCK----- mQINBF2Cr7UBEADJZHcgusOJl7ENSyumXh85z0TRV0xJorM2B/JL0kHOyigQluUG ZMLhENaG0bYatdrKP+3H91lvK050pXwnO/R7fB/FSTouki4ciIx5OuLlnJZIxSzx PqGl0mkxImLNbGWoi6Lto0LYxqHN2iQtzlwTVmq9733zd3XfcXrZ3+LblHAgEt5G TfNxEKJ8soPLyWmwDH6HWCnjZ/aIQRBTIQ05uVeEoYxSh6wOai7ss/KveoSNBbYz gbdzoqI2Y8cgH2nbfgp3DSasaLZEdCSsIsK1u05CinE7k2qZ7KgKAUIcT/cR/grk C6VwsnDU0OUCideXcQ8WeHutqvgZH1JgKDbznoIzeQHJD238GEu+eKhRHcz8/jeG 94zkcgJOz3KbZGYMiTh277Fvj9zzvZsbMBCedV1BTg3TqgvdX4bdkhf5cH+7NtWO lrFj6UwAsGukBTAOxC0l/dnSmZhJ7Z1KmEWilro/gOrjtOxqRQutlIqG22TaqoPG fYVN+en3Zwbt97kcgZDwqbuykNt64oZWc4XKCa3mprEGC3IbJTBFqglXmZ7l9ywG EEUJYOlb2XrSuPWml39beWdKM8kzr1OjnlOm6+lpTRCBfo0wa9F8YZRhHPAkwKkX XDeOGpWRj4ohOx0d2GWkyV5xyN14p2tQOCdOODmz80yUTgRpPVQUtOEhXQARAQAB tCFBV1MgQ0xJIFRlYW0gPGF3cy1jbGlAYW1hem9uLmNvbT6JAlQEEwEIAD4WIQT7 Xbd/1cEYuAURraimMQrMRnJHXAUCXYKvtQIbAwUJB4TOAAULCQgHAgYVCgkICwIE FgIDAQIeAQIXgAAKCRCmMQrMRnJHXJIXEAChLUIkg80uPUkGjE3jejvQSA1aWuAM yzy6fdpdlRUz6M6nmsUhOExjVIvibEJpzK5mhuSZ4lb0vJ2ZUPgCv4zs2nBd7BGJ MxKiWgBReGvTdqZ0SzyYH4PYCJSE732x/Fw9hfnh1dMTXNcrQXzwOmmFNNegG0Ox au+VnpcR5Kz3smiTrIwZbRudo1ijhCYPQ7t5CMp9kjC6bObvy1hSIg2xNbMAN/Do ikebAl36uA6Y/Uczjj3GxZW4ZWeFirMidKbtqvUz2y0UFszobjiBSqZZHCreC34B hw9bFNpuWC/0SrXgohdsc6vK50pDGdV5kM2qo9tMQ/izsAwTh/d/GzZv8H4lV9eO tEis+EpR497PaxKKh9tJf0N6Q1YLRHof5xePZtOIlS3gfvsH5hXA3HJ9yIxb8T0H QYmVr3aIUes20i6meI3fuV36VFupwfrTKaL7VXnsrK2fq5cRvyJLNzXucg0WAjPF RrAGLzY7nP1xeg1a0aeP+pdsqjqlPJom8OCWc1+6DWbg0jsC74WoesAqgBItODMB rsal1y/q+bPzpsnWjzHV8+1/EtZmSc8ZUGSJOPkfC7hObnfkl18h+1QtKTjZme4d H17gsBJr+opwJw/Zio2LMjQBOqlm3K1A4zFTh7wBC7He6KPQea1p2XAMgtvATtNe YLZATHZKTJyiqA== =vYOk -----END PGP PUBLIC KEY BLOCK-----
    For reference, the following are the details of the public key.
    Key ID: A6310ACC4672 Type: RSA Size: 4096/4096 Created: 2019-09-18 Expires: 2023-09-17 User ID: AWS CLI Team <aws-cli@amazon.com> Key fingerprint: FB5D B77F D5C1 18B8 0511 ADA8 A631 0ACC 4672 475C
    4. Import the AWS CLI public key with the following command, substituting public-key-file-name with the file name of the public key you created.
    $ gpg --import public-key-file-name gpg: /home/username/.gnupg/trustdb.gpg: trustdb created gpg: key A6310ACC4672475C: public key "AWS CLI Team <aws-cli@amazon.com>" imported gpg: Total number processed: 1 gpg: imported: 1
    5. Download the AWS CLI signature file for the package you downloaded at https://awscli.amazonaws.com/awscli.tar.gz.sig. It has the same path and name as the tarball file it corresponds to, but has the extension .sig. Save it in the same path as the tarball file. Or use the following command block:
    $ curl -o awscliv2.sig https://awscli.amazonaws.com/awscli.tar.gz.sig
    6. Verify the signature, passing both the downloaded.sig and .zip file names as parameters to the gpg command.
    $ gpg --verify awscliv2.sig awscli.tar.gz
    The output should look similar to the following.
    gpg: Signature made Mon Nov 4 19:00:01 2019 PST gpg: using RSA key FB5D B77F D5C1 18B8 0511 ADA8 A631 0ACC 4672 475C gpg: Good signature from "AWS CLI Team <aws-cli@amazon.com>" [unknown] gpg: WARNING: This key is not certified with a trusted signature! gpg: There is no indication that the signature belongs to the owner. Primary key fingerprint: FB5D B77F D5C1 18B8 0511 ADA8 A631 0ACC 4672 475C
    ###### Important
    The warning in the output is expected and doesn't indicate a problem. It occurs because there isn't a chain of trust between your personal PGP key (if you have one) and the AWS CLI PGP key. For more information, see Web of trust.

Show moreShow less 2. You have an environment that can run GNU Autotools generated files such as configure andMakefile. These files are widely portable across POSIX platforms.
Linux and macOS
If Autotools is not already installed in your environment or you need to update them, then follow the installation instructions found in How do I install the Autotools (as user)? or Basic Installation in the GNU documentation.
Windows PowerShell
Since Windows does not come with a POSIX-compliant shell, you need to install additional software to install the AWS CLI from source.MSYS2 provides a collection of tools and libraries to help build and install Windows software, especially for the POSIX-based scripting that Autotools uses.

  1. Install MSYS2. For information on installing and using MSYS2, see the install and usage instructions in the MSYS2 Documentation.
  2. Open the MSYS2 terminal and install autotools using the following command.
$ pacman -S autotools  
Note

When using the configure, build, and install code examples in this guide for Windows, the default MSYS2 install path ofC:\msys64\usr\bin\bash is assumed. When calling MSYS2 inside of PowerShell you'll be using the following format, with the bash command in quotes:

PS C:\> C:\msys64\usr\bin\bash  -lc "command example"  

The following command example calls the./configure command.

PS C:\> C:\msys64\usr\bin\bash  -lc "./configure"  
  1. A Python 3.8 or later interpreter is installed. The minimum Python version required follows the same timelines as the official Python support policy for AWS SDKs and Tools. An interpreter is only supported 6 months after its end-of-support date.
  2. (Optional) Install all build and runtime Python library dependencies of the AWS CLI. The./configure command informs you if you are missing any dependencies and how to install them.
    You can automatically install and use these dependencies through configuration, see Downloading dependencies for more information.

Step 2: Configuring the AWS CLI source installation

Configuration for building and installing the AWS CLI is specified using theconfigure script. For the documentation of all configuration options, run the configure script with the --help option:

Linux and macOS

$ ./configure --help

Windows PowerShell

PS C:\> C:\msys64\usr\bin\bash -lc "./configure --help" 
The most important options are the following:

Install location

The source installation of the AWS CLI uses two configurable directories to install the AWS CLI:

The following configure options control the directories used:

Linux and macOS

The following command example uses the --prefix option to do a local user install of the AWS CLI. This command installs the AWS CLI in$HOME/.local/lib/aws-cli and the executables in$HOME/.local/bin:

$ ./configure --prefix=$HOME/.local

The following command example uses the --libdir option to install the AWS CLI as an add-on application in the /opt directory. This command installs the AWS CLI at /opt/aws-cli and the executables at their default location of/usr/local/bin.

$ ./configure --libdir=/opt

Windows PowerShell

The following command example uses the --prefix option to do a local user install of the AWS CLI. This command installs the AWS CLI in$HOME/.local/lib/aws-cli and the executables in$HOME/.local/bin:

$ C:\msys64\usr\bin\bash -lc "./configure --prefix='C:\Program Files\AWSCLI'" 

The following command example uses the --libdir option to install the AWS CLI as an add-on application in the /opt directory. This command installs the AWS CLI at C:\Program Files\AWSCLI\opt\aws-cli.

Python interpreter

Note

It is highly recommended to specify the Python interpreter when installing for Windows.

The ./configure script automatically selects an installed Python 3.8 or later interpreter to use in building and running the AWS CLI using theAM_PATH_PYTHON Autoconf macro.

The Python interpreter to use can be explicitly set using the PYTHON environment variable when running the configure script:

Linux and macOS

$ PYTHON=/path/to/python ./configure

Windows PowerShell

PS C:\> C:\msys64\usr\bin\bash -lc "PYTHON='C:\path\to\python' ./configure"

Downloading dependencies

By default, it is required that all build and runtime dependencies of the AWS CLI are already installed on the system. This includes any Python library dependencies. All dependencies are checked when the configure script is run, and if the system is missing any Python dependencies, the configure script errors out.

The following code example errors out when your system is missing dependencies:

Linux and macOS

$ ./configure 
checking for a Python interpreter with version >= 3.8... python
checking for python... /Users/username/.envs/env3.11/bin/python
checking for python version... 3.11
checking for python platform... darwin
checking for GNU default python prefix... ${prefix}
checking for GNU default python exec_prefix... ${exec_prefix}
checking for python script directory (pythondir)... ${PYTHON_PREFIX}/lib/python3.11/site-packages
checking for python extension module directory (pyexecdir)... ${PYTHON_EXEC_PREFIX}/lib/python3.11/site-packages
checking for --with-install-type... system-sandbox
checking for --with-download-deps... Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/username/aws-code/aws-cli/./backends/build_system/__main__.py", line 125, in <module>
    main()
  File "/Users/username/aws-code/aws-cli/./backends/build_system/__main__.py", line 121, in main
    parsed_args.func(parsed_args)
  File "/Users/username/aws-code/aws-cli/./backends/build_system/__main__.py", line 49, in validate
    validate_env(parsed_args.artifact)
  File "/Users/username/aws-code/aws-cli/./backends/build_system/validate_env.py", line 68, in validate_env
    raise UnmetDependenciesException(unmet_deps, in_venv)
validate_env.UnmetDependenciesException: Environment requires following Python dependencies:

awscrt (required: ('>=0.12.4', '<0.17.0')) (version installed: None)

We recommend using --with-download-deps flag to automatically create a virtualenv and download the dependencies.

If you want to manage the dependencies yourself instead, run the following pip command:
/Users/username/.envs/env3.11/bin/python -m pip install --prefer-binary 'awscrt>=0.12.4,<0.17.0'

configure: error: "Python dependencies not met."

Windows PowerShell

PS C:\> C:\msys64\usr\bin\bash -lc "./configure" 
checking for a Python interpreter with version >= 3.8... python
checking for python... /Users/username/.envs/env3.11/bin/python
checking for python version... 3.11
checking for python platform... darwin
checking for GNU default python prefix... ${prefix}
checking for GNU default python exec_prefix... ${exec_prefix}
checking for python script directory (pythondir)... ${PYTHON_PREFIX}/lib/python3.11/site-packages
checking for python extension module directory (pyexecdir)... ${PYTHON_EXEC_PREFIX}/lib/python3.11/site-packages
checking for --with-install-type... system-sandbox
checking for --with-download-deps... Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/username/aws-code/aws-cli/./backends/build_system/__main__.py", line 125, in <module>
    main()
  File "/Users/username/aws-code/aws-cli/./backends/build_system/__main__.py", line 121, in main
    parsed_args.func(parsed_args)
  File "/Users/username/aws-code/aws-cli/./backends/build_system/__main__.py", line 49, in validate
    validate_env(parsed_args.artifact)
  File "/Users/username/aws-code/aws-cli/./backends/build_system/validate_env.py", line 68, in validate_env
    raise UnmetDependenciesException(unmet_deps, in_venv)
validate_env.UnmetDependenciesException: Environment requires following Python dependencies:

awscrt (required: ('>=0.12.4', '<0.17.0')) (version installed: None)

We recommend using --with-download-deps flag to automatically create a virtualenv and download the dependencies.

If you want to manage the dependencies yourself instead, run the following pip command:
/Users/username/.envs/env3.11/bin/python -m pip install --prefer-binary 'awscrt>=0.12.4,<0.17.0'

configure: error: "Python dependencies not met."

To automatically install the required Python dependencies, use the--with-download-deps option. When using this flag, the build process does the following:

The following configure command example uses the --with-download-deps option to download and use the Python dependencies:

Linux and macOS

$ ./configure --with-download-deps

Windows PowerShell

PS C:\> C:\msys64\usr\bin\bash -lc "./configure --with-download-deps"

Install type

The source install process supports the following installation types:

To configure the installation type, use the --with-install-type option and specify a value of portable-exe orsystem-sandbox.

The following ./configure command example specifies a value ofportable-exe:

Linux and macOS

$ ./configure --with-install-type=portable-exe

Windows PowerShell

PS C:\> C:\msys64\usr\bin\bash -lc "./configure --with-install-type=portable-exe"

Step 3: Building the AWS CLI

Use the make command to build the AWS CLI using your configuration settings:

Linux and macOS

$ make

Windows PowerShell

PS C:\> C:\msys64\usr\bin\bash -lc "make"
Note
When using the make command, the following steps are completed behind the scenes:
  1. A virtual environment is created in the build directory using the Python venv module. The virtual environment is bootstraped with a version of pip that is vendored in the Python standard library.
  2. Copies Python library dependencies. Depending on if the--with-download-deps flag is specified in theconfigure command, this step does one of the following:
    • The --with-download-deps is specified. Python dependencies are pip installed. This includeswheel, setuptools, and all AWS CLI runtime dependencies. If you are building theportable-exe, pyinstaller is installed. These requirements are all specified in lock files generated from pip-compile.
    • The --with-download-deps is not specified. Python libraries from the Python interpreter's site package plus any scripts (e.g. pyinstaller) are copied into the virtual environment being used for the build.
  3. Runs pip install directly on the AWS CLI codebase to do an offline, in-tree build and install of the AWS CLI into the build virtual environment. This install uses the pip flags --no-build-isolation , --use-feature=in-tree-build , --no-cache-dir , and --no-index.
  4. (Optional) If the--install-type is set to portable-exe in the configure command, builds a standalone executable usingpyinstaller.

Show moreShow less

Step 4: Installing the AWS CLI

The make install command installs your built AWS CLI to the configured location on the system.

Linux and macOS

The following command example installs the AWS CLI using your configuration and build settings:

$ make install

Windows PowerShell

The following command example installs the AWS CLI using your configuration and build settings, then adds an environment variable with the path for the AWS CLI:

PS C:\> C:\msys64\usr\bin\bash -lc " make install "
PS C:\> $Env:PATH +=";C:\Program Files\AWSCLI\bin\"

The make install rule supports the DESTDIR variable. When specified, this variable prefixes the specified path to the already configured installation path when installing the AWS CLI. By default, no value is set for this variable.

Linux and macOS

The following code example uses a --prefix=/usr/local flag for configuring an install location, and then alters that destination usingDESTDIR=`/tmp/stage` for themake install command. These commands result in the AWS CLI being installed at`/tmp/stage/`usr/local/lib/aws-cli and its executables located in`/tmp/stage/`usr/local/bin.

$ ./configure --prefix=/usr/local
$ make
$ make DESTDIR=/tmp/stage install

Windows PowerShell

The following code example uses a --prefix=\awscli flag for configuring an install location, and then alters that destination usingDESTDIR=`C:\Program Files` for the make install command. These commands result in the AWS CLI being installed at `C:\Program Files`\awscli.

$ ./configure --prefix=\awscli
$ make
$ make DESTDIR='C:\Program Files' install
Note
When running make install, the following steps are completed behind the scenes
  1. Moves one of the following to the configured install directory:
    • If the install type is system-sandbox, moves your built virtual environment.
    • If the install type is a portable-exe, moves your built standalone executable.
  2. Creates symlinks for both the aws andaws_completer executables in your configured bin directory.

Show moreShow less

Step 5: Verifying the AWS CLI installation

Confirm the AWS CLI successfully installed by using the following command:

$ aws --version
aws-cli/2.25.11 Python/3.11.6 Windows/10 exe/AMD64 prompt/off

If the aws command is not recognized, you may need to restart your terminal for new symlinks to update. If you come across additional issues after installing or uninstalling the AWS CLI, see Troubleshooting errors for the AWS CLI for common troubleshooting steps

Workflow examples

This section provides some basic workflow examples for installing from source.

Basic Linux and macOS install

The following example is a basic installation workflow where the AWS CLI is installed in the default location of /usr/local/lib/aws-cli.

$ cd path/to/cli/respository/
$ ./configure
$ make
$ make install

Automated Windows install

Note

You must run PowerShell as an Administrator to use this workflow.

MSYS2 can be used in an automated fashion in a CI setting, see Using MSYS2 in CI in the MSYS2 Documentation.

Downloaded Tarball

Download the awscli.tar.gz file, extract, and install the AWS CLI. When using the following commands, replace the following paths:

The following code example automates building and installing the AWS CLI from PowerShell using MSYS2, and specifies which local install of Python to use:

PS C:\> curl -o awscli.tar.gz https://awscli.amazonaws.com/awscli.tar.gz  #  Download the awscli.tar.gz file in the current working directory
PS C:\> tar -xvzf .\awscli.tar.gz #  Extract awscli.tar.gz file
PS C:\> cd .\awscli-2.x.x\ #  Navigate to the root of the extracted files
PS C:\> $env:CHERE_INVOKING = 'yes' #  Preserve the current working directory
PS C:\> C:\msys64\usr\bin\bash  -lc " PYTHON='C:\path\to\python.exe' ./configure --prefix='C:\Program Files\AWSCLI' --with-download-deps " 
PS C:\> C:\msys64\usr\bin\bash  -lc "make"
PS C:\> C:\msys64\usr\bin\bash  -lc "make install"
PS C:\> $Env:PATH +=";C:\Program Files\AWSCLI\bin\"
PS C:\> aws --version
aws-cli/2.25.11 Python/3.11.6 Windows/10 source-sandbox/AMD64

GitHub Repository

Download the awscli.tar.gz file, extract, and install the AWS CLI. When using the following commands, replace the following paths:

The following code example automates building and installing the AWS CLI from PowerShell using MSYS2, and specifies which local install of Python to use:

PS C:\> cd C:path\to\cli\repository\
PS C:\> $env:CHERE_INVOKING = 'yes' #  Preserve the current working directory
PS C:\> C:\msys64\usr\bin\bash  -lc " PYTHON='C:\path\to\python.exe' ./configure --prefix='C:\Program Files\AWSCLI' --with-download-deps " 
PS C:\> C:\msys64\usr\bin\bash  -lc "make"
PS C:\> C:\msys64\usr\bin\bash  -lc "make install"
PS C:\> $Env:PATH +=";C:\Program Files\AWSCLI\bin\"
PS C:\> aws --version

Alpine Linux container

Below is an example Dockerfile that can be used to get a working installation of the AWS CLI in an Alpine Linux container as an alternative to pre-built binaries for Alpine. When using this example, replaceAWSCLI_VERSION with you desired AWS CLI version number:

FROM python:3.8-alpine AS builder

ENV AWSCLI_VERSION=2.10.1

RUN apk add --no-cache \
    curl \
    make \
    cmake \
    gcc \
    g++ \
    libc-dev \
    libffi-dev \
    openssl-dev \
    && curl https://awscli.amazonaws.com/awscli-${AWSCLI_VERSION}.tar.gz | tar -xz \
    && cd awscli-${AWSCLI_VERSION} \
    && ./configure --prefix=/opt/aws-cli/ --with-download-deps \
    && make \
    && make install

FROM python:3.8-alpine

RUN apk --no-cache add groff

COPY --from=builder /opt/aws-cli/ /opt/aws-cli/

ENTRYPOINT ["/opt/aws-cli/bin/aws"]

This image is built and the AWS CLI invoked from a container similar to the one that is built on Amazon Linux 2:

$ docker build --tag awscli-alpine .
$ docker run --rm -it awscli-alpine --version
aws-cli/2.2.1 Python/3.8.11 Linux/5.10.25-linuxkit source-sandbox/x86_64.alpine.3 prompt/off

The final size of this image is smaller than the size of the official AWS CLI Docker image. For information on the official Docker image, see Running the official Amazon ECR Public or Docker images for the AWS CLI.

Troubleshooting AWS CLI install and uninstall errors

For troubleshooting steps for install errors, see Troubleshooting errors for the AWS CLI for common 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.

For any issues not covered in the troubleshooting guides, search the issues with thesource-distribution label in the AWS CLI Repository on GitHub. If no existing issues cover your errors, create a new issue to receive help from the AWS CLI maintainers.

Next steps

After installing the AWS CLI, you should perform a Setting up the AWS CLI.