How to Install the AWS CLI on macOS Using Homebrew: A Step-by-Step Guide

Umar Farooque Khan
2 min readFeb 10, 2025

--

Follow these simple steps to install the AWS Command Line Interface (CLI) on your Mac using Homebrew.

Step 1: Open Terminal

First, open Terminal on your macOS. You can find it by searching for “Terminal” in Spotlight (Cmd + Space).

Step 2: Update Homebrew (Recommended)

Before installing anything, it’s good practice to make sure Homebrew is up-to-date. Run the following command:

brew update

This will update Homebrew and ensure you’re installing the latest version of the AWS CLI.

Step 3: Install the AWS CLI

Next, use Homebrew to install the AWS CLI by running this command:

brew install awscli

Homebrew will download and install the AWS CLI on your Mac.

Step 4: Confirm the Installation

Once the installation is finished, confirm that the AWS CLI was installed correctly by checking its version:

aws --version

You should see output similar to:

aws-cli/2.x.x Python/3.x.x Darwin/20.x.x source/x86_64

This confirms that the AWS CLI is successfully installed on your system.

Step 5: Configure the AWS CLI

To start using the AWS CLI, you’ll need to configure it with your AWS credentials. Run the following command:

aws configure

You’ll be prompted to enter the following information:

  • AWS Access Key ID: Your AWS access key (from your IAM user).
  • AWS Secret Access Key: Your AWS secret key.
  • Default region name: Your preferred AWS region (e.g., us-east-1).
  • Default output format: The desired output format (e.g., json, text, or table).

You’re Ready to Go!

The AWS CLI is now installed and configured on your Mac. You can begin using it to interact with your AWS resources from the terminal.

Conclusion

Installing the AWS CLI on macOS using Homebrew is quick and straightforward. With the CLI installed, you can easily manage your AWS services directly from the command line. This opens up opportunities for more efficient automation, deployment, and monitoring. Get ready to streamline your cloud workflow and take full advantage of AWS’s powerful features!

--

--

Umar Farooque Khan
Umar Farooque Khan

Written by Umar Farooque Khan

Experienced software developer with a passion for clean code and problem-solving. Full-stack expertise in web development. Lifelong learner and team player.

No responses yet