No official way to install the AWS CLI (v2) on Mac M1 (without Rosetta)
Problem
Describe the bug There is no package available for M1 Macs for the AWS CLI v2. The only current way to do so is through Homebrew the problems are detailed here - https://roadtoaws.com/2022/02/10/installing-aws-cli-on-apple-silicon/ Expected Behavior Base don the documentation I would assume that I can do this [code block] Current Behavior The only way to install AWS is through Homebrew. This is an unofficial workaround https://roadtoaws.com/2022/02/10/installing-aws-cli-on-apple-silicon/ Reproduction Steps https://roadtoaws.com/2022/02/10/installing-aws-cli-on-apple-silicon/ Possible Solution https://roadtoaws.com/2022/02/10/installing-aws-cli-on-apple-silicon/ or to install Rosetta on a M1 Mac https://support.apple.com/en-il/HT211861 Additional Information/Context _No response_ CLI version used v2 Environment details (OS name and version, etc.) M1 Mac
Unverified for your environment
Select your OS to check compatibility.
2 Fixes
Install AWS CLI v2 on Mac M1 without Rosetta
The AWS CLI v2 does not have a native ARM64 version available for M1 Macs, leading to reliance on Homebrew as the only installation method. This creates complications for users who prefer not to use Rosetta for compatibility with x86_64 binaries.
Awaiting Verification
Be the first to verify this fix
- 1
Download AWS CLI v2 Installer
Download the AWS CLI v2 installer directly from the official AWS website for ARM architecture.
bashcurl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg" - 2
Install AWS CLI v2 Package
Use the installer package to install AWS CLI v2 directly on your M1 Mac.
bashsudo installer -pkg AWSCLIV2.pkg -target / - 3
Verify Installation
Check if the AWS CLI v2 is installed correctly by running the version command.
bashaws --version - 4
Configure AWS CLI
Set up your AWS credentials and configuration using the AWS CLI configure command.
bashaws configure
Validation
To confirm the fix worked, run 'aws --version' in the terminal. You should see the AWS CLI version 2.x.x displayed without any errors. Additionally, run 'aws configure' to set up your credentials and ensure the CLI operates correctly.
Sign in to verify this fix
1 low-confidence fix
Install AWS CLI v2 on Mac M1 without Rosetta
The AWS CLI v2 does not provide a native installation package for Apple Silicon (M1) Macs, leading users to rely on Homebrew as the only installation method. This creates challenges for users who prefer not to use Rosetta for compatibility with x86 applications.
Awaiting Verification
Be the first to verify this fix
- 1
Install Homebrew
If Homebrew is not already installed on your M1 Mac, you need to install it first. Homebrew is a package manager that simplifies the installation of software on macOS.
bash/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" - 2
Add Homebrew to your PATH
Ensure that Homebrew is added to your shell's PATH. This allows you to run the 'brew' command from any terminal session.
bashecho 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile && eval "$(/opt/homebrew/bin/brew shellenv)" - 3
Install AWS CLI v2 using Homebrew
With Homebrew installed, you can now install the AWS CLI v2. This method is currently the most straightforward way to get AWS CLI running on M1 Macs.
bashbrew install awscli - 4
Verify AWS CLI installation
After installation, confirm that the AWS CLI is installed correctly by checking its version. This ensures that the installation was successful.
bashaws --version - 5
Update AWS CLI to the latest version
To ensure you have the latest features and fixes, update the AWS CLI to the latest version using Homebrew.
bashbrew upgrade awscli
Validation
To confirm the fix worked, run 'aws --version' in your terminal. You should see the version number of AWS CLI v2 without any errors. Additionally, check for the latest version using 'brew upgrade awscli'.
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep