% aws s3 ls
zsh: command not found: aws
The most common reason for the error is that you do not have aws command line tool not installed on your Mac device.
How to install "aws command line (awscli)" tool on the Mac?
Option 1: Using Homebrew Package Manager
As brew is the most popular package manager for macOS, you can try installing awscli using the brew install command.
- Open Terminal Application.
- Make sure brew is installed (if now follow this article: link
- Now run the command: brew install awscli
- This will fix the aws command not found error!
Option 2: Using GUI Installer
If you are a GUI person, well there is an option for that as well.
- Download the AWSCLIv2 pkg file: https://awscli.amazonaws.com/AWSCLIV2.pkg
- Just follow the instructions after clicking the software file - you will be asked to agree on license and your Mac password for installation.
Option 3: Using Command Line Curl Command
If you are a GUI person, well there is an option for that as well.
- Download the pkg file using curl command on your Terminal.
% curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg" - Now install the package using installer command,
% sudo installer -pkg AWSCLIV2.pkg -target /
The other reason for the error could be that AWS CLI is not added in the PATH environment variable. Make sure to add it to the path of .zshrc file that you can find under home
Open this file ~/.zshrc using VIM or Nano editor and check.
% nano ~/.zshrc
You can know where aws cli has been installed using the command which.
Example:% which aws
/opt/homebrew/bin/aws
Provide Feedback For This Article
We take your feedback seriously and use it to improve our content. Thank you for helping us serve you better!
😊 Thanks for your time, your feedback has been registered!






Comments & Discussion
Facing issues? Have questions? Post them here! We're happy to help!