% 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
- What is Terminal Velocity and its Formula? How to calculate it programmatically? - Python
- [Solution] The connection to the remote PC was lost, preparing to reconnect - Windows RDP - Windows
- Add Calendar to SharePoint Site (Office 365) - SharePoint
- Fix: Windows 11 Something went wrong - We coudnt find info for that Account (Windows 365 Business) - Windows-11
- Health Status Page for OpenAI ChatGPT or GPT 4 - HowTos
- How to Copy files from Docker Container to Host System - Docker
- Special character & not working with SharePoint REST API - SharePoint
- How to install Spring CLI using Mac Terminal - HowTos
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!