Swift Software Group

Setup macOS for AWS Cloud DevOps

Step-by-step AWS DevOps environment setup for macOS.

Scripts are bash

Misc

Finder

Show hidden files:

defaults write com.apple.finder AppleShowAllFiles YES

Hold the ‘Option/alt’ key, then right click on the Finder icon in the dock and click Relaunch

Tools

AWS CLI

Install:

cd ~/Downloads
curl "https://awscli.amazonaws.com/AWSCLIV2.pkg" -o "AWSCLIV2.pkg"
sudo installer -pkg AWSCLIV2.pkg -target /

Test:

which aws
aws --version
# /usr/local/bin/aws
# aws-cli/2.8.2 Python/3.9.11 Darwin/21.6.0 exe/x86_64 prompt/off

Enable bash auto-completion:

complete -C aws_completer aws

Homebrew

Install Homebrew:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

bash 5+

macOS comes with outdated version of bash. Install latest version.

brew update
brew install bash

gnupg

brew install gnupg

jq

See jq for details. Install via Homebrew:

brew install jq

mo

Mustache Templates in Bash.

See: https://github.com/tests-always-included/mo

# Download
curl -sSL https://git.io/get-mo -o mo

# Make executable
chmod +x mo

# Move to the right folder
sudo mv mo /usr/local/bin/

# Test
echo "works" | mo

reg

reg is Docker registry v2 command line client and repo listing generator.

Switch to root:

sudo su -

Install:

# Export the sha256sum for verification.
export REG_SHA256="2768ac56ad640e8ee5b74752fc9bbeaf37f37a34c7e1ddcb6d0e384a3096b1c2"

# Download and check the sha256sum.
sudo curl -fSL "https://github.com/genuinetools/reg/releases/download/v0.16.1/reg-darwin-amd64" -o "/usr/local/bin/reg" \
  && echo "${REG_SHA256}  /usr/local/bin/reg" | sha256sum -c - \
  && sudo chmod a+x "/usr/local/bin/reg"

Test:

reg --help

Docker Desktop

Install via Homebrew:

brew install --cask docker

Adjust Memory

On macOS Docker Desktop the standard memory settings are too low (3 GB)

Start Docker Desktop

Open: Preferences > Resources > Advanced

Set Memory to 4GB or more

Hit Apply & Restart