EC2 macOS Homebrew Tap

December 6, 2023 ยท View on GitHub

AWS offers EC2-optimized macOS AMIs for developer use. The EC2 Mac AMIs provided by AWS include this Tap by default, which provides a simple way to get these tools and updates to them.

What is Homebrew?

Homebrew is a package manager for macOS, which provides easy installation and update management of additional software.

What is a Tap?

A third-party (in relation to Homebrew) repository, which provides installable packages on macOS.

See more at https://docs.brew.sh/Taps.

What packages are available in this Tap?

This Tap (repository) contains the formulae that are used in the macOS AMI(s) that are offered by AWS for launching EC2 Mac instances.

This includes:

NameDescriptionTypePackage Name
Amazon ENAEC2 Mac ENA Network Driver for macOSCaskamazon-ena-ethernet
Amazon ENA DriverKitEC2 Mac ENA Network Driver for macOS Monterey and later (arm64 only)Caskamazon-ena-ethernet-dext
Amazon EFSAmazon Elastic File SystemKegamazon-efs-utils
Amazon SSM AgentAmazon SSM AgentCaskamazon-ssm-agent
EC2 macOS InitInstance initialization and configuration, including performance optimizationCaskec2-macos-init
EC2 System Monitor for macOSFor collecting system monitoring CloudWatch metrics on mac1.metal instancesCaskec2-macos-system-monitoring
EC2 macOS UtilsProvides common command-line tool for customizing EC2 Mac instancesCaskec2-macos-utils
EC2 Instance ConnectEC2 Instance ConnectCaskec2-instance-connect

How do I install the packages from this Tap?

This Tap follows standard Homebrew commands, for more information, please refer to the Homebrew Documentation. Updating homebrew itself is done via the following command:

brew update

The above command will update homebrew itself and this comamnd should always be run prior to attempts to install or update any packages with brew.

Installing the Tap

The macOS AMIs provided by AWS already come with Homebrew installed and this Tap "pretapped". To manually install the Tap, use the the brew tap command:

brew tap aws/homebrew-aws

Removing the Tap

If this Tap needs to be removed for any reason, Homebrew includes a specific command for this. (Note: This will only remove the Tap and it will preserve anything that was previously installed)

brew untap aws/homebrew-aws

Updating Packages

To update a specific package (Keg or Cask) that has been installed from this tap. Kegs use the default brew upgrade <package> command, while Casks have their own sub-command: brew upgrade --cask <package>.

For example:

TypeUpdate Command
Full Systembrew upgrade
Kegbrew upgrade amazon-efs-utils
Caskbrew upgrade --cask amazon-ena-ethernet-dext

Installing Packages

There are two primary ways to install software from the Tap. Kegs use the default brew install <package> command, while Casks have their own sub-command: brew install --cask <package>.

For example:

TypeInstall Command
Kegbrew install amazon-efs-utils
Caskbrew install --cask amazon-ena-ethernet-dext

Removing Packages

Removing software is similar to installing software. Kegs and Casks now use the same brew remove <package> command.

For example:

TypeUninstall Command
Kegbrew remove amazon-efs-utils
Caskbrew remove amazon-ssm-agent

Documentation

To get more information about brew you can run brew help or man brew on a mac1.metal instance or check Homebrew's documentation for Homebrew's complete documentation.

License

This project is licensed under the Apache License, version 2.0.