The aws command is the client for AWS service operations. AWS's ZIP installer installs AWS CLI v2 on Ubuntu, with the executable path and major version checked before use.

AWS supports the ZIP installer on recent 64-bit Ubuntu releases, with separate archives for x86_64 and aarch64 systems. Older APT, pip, or snap copies can still take precedence on PATH after installation, so the active command must point to the intended copy.

The ZIP installer does not auto-update. AWS's installation instructions also cover an optional signature check for the archive.

Steps to install AWS CLI v2 on Ubuntu:

  1. Refresh the local package index.
    $ sudo apt update
  2. Install the download and extraction tools.
    $ sudo apt install curl unzip
  3. Change to the temporary directory.
    $ cd /tmp
  4. 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.

  5. Extract the installer.
    $ unzip awscliv2.zip
  6. 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.

  7. Remove the installer files.
    $ rm -r aws awscliv2.zip
  8. Check which aws command the shell uses.
    $ which aws
    /usr/local/bin/aws

    If the result is /usr/bin/aws, /snap/bin/aws, or ~/.local/bin/aws, an older install is still earlier on PATH.

  9. 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.ubuntu.26

    The version starts with aws-cli/2., and the rest of the line varies by system.
    Related: How to configure AWS CLI on Linux and macOS

Share this guide