You’ve just received you’re shiny new Mac with an Apple silicon processor – like the M1 – and would like to install the AWS CLI. As usual, you download the latest GUI installer from AWS but it prompts for Rosetta. Does this mean that the latest version only supports Intel processors? 🤔
Apple made the transition from Intel to Mac relatively easy for end-users. Rosetta 2 does a wonderful job for applications compiled exclusively for x86-64-based processors to be translated for execution on Apple silicon. Since Apple silicon has been out for a while many developers provide Apple silicon compiled binaries. In fact, there are fewer major companies that don’t provide an Apple silicon version of their app. This is why some people, including myself – never install Rosetta. In this way, I can guarantee that all my apps are optimized for the new processor.
The AWS documentation says that there are three ways to install the CLI on the Mac:
- GUI Installer
- Command line installer – All users
- Command line – Current user
The sad news is that all of these methods use the same macOS pkg file. This installer in this file is not yet optimized for Apple silicon but the included binaries are. This means that you have to install Rosetta just to install an Apple silicon app. Strange, indeed. 🙃 Thankfully there’s another solution that the official documentation doesn’t mention, Brew.
Homebrew is the missing package manager for macOS. You probably already use it if you would like to install apps like wget or mc. Installation is simple and straightforward, just run the following command in your terminal.
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Next run these two commands to add Brew to your PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zprofile
eval "$(/opt/homebrew/bin/brew shellenv)"
The only downside I see with Brew is it sends data to Google. It does warn you about this but doesn’t tell you how to turn it off. While Homebrew maintainers say these analytics help them decide on future features and prioritize current work – and recommends them to keep it on – I am still not a fan of personal data collection, even if it’s anonymous. To turn this off simply run the following command:
brew analytics off
Now that Brew is installed you can easily install the AWS CLI by executing the following command:
brew install awscli
Voilà, the AWS CLI is now installed without Rosetta. 🤘
⚠️ I should note that this workaround was needed at the time of writing this article and AWS will probably fix the installer, but until then just use Brew.