% 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
- Create S3 bucket and upload files using AWS Toolkit for Visual Studio Code
- Get the total size and number of objects of a AWS S3 bucket and folders
- Create an S3 bucket in a specific AWS region using CLI Command
- [Solution] AWS Java SDK S3 AmazonS3Exception InvalidAccessKeyId
- Fix AWS CLI 2 SignatureDoesNotMatch Error - Signature we calculated does not match
- 573 List of reserved keywords in AWS DynamoDB
- Quick way to setup AWS DynamoDB locally on macOS
- [Solution] com.amazonaws.dynamodb.v20120810 MissingAuthenticationToken Key Id or X.509 certificate
- Quick way to install AWS CLI for macOS Terminal
- Setting and Updating AWS CLI Configuration
- AWS S3 CLI BucketAlreadyExists when calling CreateBucket Error make_bucket failed
- How to install AWS Toolkit for Visual Studio Code
- Create S3 bucket using AWS CLI Command mb
- Fix: zsh: command not found: aws (Mac/macOS)
- How to install AWS CLI on Ubuntu
- Fix: Amazon Linux bash: sudo: command not found
- How to Setup AWS Credentials using Visual Studio Code
- AW3 CLI command to get list of all region names
- Most Essencial AWS CLI 2 S3 ls Command Options
- Install AWS CLI using Brew Command
- How to Access Terminal (Command Line) in Eclipse IDE - Eclipse
- How to check installed docker version command - Docker
- How to install XML Tools Plugin Notepad++ - NotepadPlusPlus
- Create simple struts2 project using maven commands - Java
- macOS Ventura XCode Command Line Tools Installation - MacOS
- Android Studio Change SDK Path - Android
- Fix: TypeError: can only concatenate str (not int) to str in Python - Python
- How to fix: You will need Google Chrome to install most apps, extensions and themes. - Chrome
You can know where aws cli has been installed using the command which.
Example:% which aws
/opt/homebrew/bin/aws
Have Questions? Post them here!