RHEL-family servers use AWS CLI to manage AWS services from the shell. The AWS Linux ZIP installer installs AWS CLI v2 on 64-bit CentOS Stream 9 or 10 and Red Hat Enterprise Linux (RHEL) 8, 9, or 10 with x86_64 or aarch64 processors.

CentOS Linux 7 and RHEL 7 are outside this installation path. CentOS Linux 7 reached end of life on June 30, 2024, and RHEL 7 entered its Extended Life Phase on the same date.

yum install awscli and dnf install awscli look for a package in the enabled repositories, whose versions and availability vary, instead of running AWS's installer. The ZIP installer does not auto-update, and AWS's installation instructions cover an optional signature check for the archive.

Steps to install AWS CLI v2 on CentOS Stream or Red Hat Enterprise Linux:

  1. Install the packages the installer and aws help use.
    $ sudo dnf install unzip groff less

    curl is already on these systems, through the curl or curl-minimal package.

  2. Download the AWS CLI v2 archive.
    $ curl "https://awscli.amazonaws.com/awscli-exe-linux-$(uname -m).zip" -o awscliv2.zip

    uname -m fills in x86_64 or aarch64 to match the computer.

  3. Extract the installer.
    $ unzip awscliv2.zip
  4. Run the bundled installer.
    $ sudo ./aws/install
    You can now run: /usr/local/bin/aws --version
    Tip: run 'aws configure agent-toolkit' to set up AWS skills and the AWS MCP server for your AI coding agent(s).

    If AWS CLI v2 is already installed this way, the installer stops and asks for sudo ./aws/install --update, so run that instead.

  5. Remove the installer files.
    $ rm -r aws awscliv2.zip
  6. Confirm that the command reports AWS CLI v2.
    $ aws --version
    aws-cli/2.39.4 Python/3.14.8 Linux/7.0.14-linuxkit exe/aarch64.centos.10

    The version starts with aws-cli/2., and the rest of the line varies by system. A line starting with aws-cli/1. means an older install is still earlier on PATH.
    Related: How to configure AWS CLI on Linux and macOS

Share this guide