% 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
- Get the total size and number of objects of a AWS S3 bucket and folders
- How to Create AWS SNS Topic using AWS CLI
- Fix: Amazon Linux bash: sudo: command not found
- [Solution] AWS Java SDK S3 AmazonS3Exception InvalidAccessKeyId
- Create an AWS User using CLI2 Command at a specific Path
- Fix: Missing the following required SSO configuration values: sso_start_url, sso_region
- Fix: zsh: command not found: aws (Mac/macOS)
- Configure AWS Access ID and Secret Keys using CLI on Mac
- Quick way to setup AWS DynamoDB locally on macOS
- Most Essencial AWS CLI 2 S3 ls Command Options
- How to Check AWS SNS Permissions using CLI
- AWS CLI Change Default Output Format
- How to install AWS CLI on Ubuntu
- Quick way to install AWS CLI for macOS Terminal
- Install AWS CLI using Brew Command
- AWS CLI Command to Get a List of SNS Topics
- Get List of AWS SNS Topic Subscriptions using CLI
- How to Setup AWS Credentials using Visual Studio Code
- Installing AWS CLI Version 2 on macOS Sonoma using Terminal
- AW3 CLI command to get list of all region names
- AWS SNS CLI Command Publish Message Attributes
- Create an S3 bucket in a specific AWS region using CLI Command
- [Fix] zsh: command not found: awscli [Mac Terminal]
- Understanding AWS Calculator: DynamoDB on-demand capacity
- [Solution] com.amazonaws.dynamodb.v20120810 MissingAuthenticationToken Key Id or X.509 certificate
- Indent XML Formatting In Notepad++ - NotepadPlusPlus
- [fix] Spring Boot Data JPA - No identifier specified for entity - Java
- Fix: Minecraft EXCEPTION_ACCESS_VIOLATION Fatal Error Java Runtime - Java
- Android [SDK Manager] The system cannot find the path specified - Android-Studio
- How to refresh Safari on Mac (macOS) using keyboard shortcut - MacOS
- [fix] java: incompatible types: double cannot be converted to java.lang.Integer Generics - Java
- MySQL #6 - Error on delete of './my-database/db.opt' (Errcode: 13 - Permission denied) - MySQL
- Change the default login shell on macOS Ventura 13.0 - MacOS
You can know where aws cli has been installed using the command which.
Example:% which aws
/opt/homebrew/bin/aws
Facing issues? Have Questions? Post them here! I am happy to answer!
Rakesh (He/Him) has over 14+ years of experience in Web and Application development. He is the author of insightful How-To articles for Code2care.
Follow him on: X
You can also reach out to him via e-mail: rakesh@code2care.org