Apple macOS on AWS

Apple macOS on AWS

I was very interested to hear that Amazon Web Services are now offering Mac Mini’s as part of their EC2 cloud computing service.

There’s quite a bit in common with other EC2 instance types, but some major differences too, so I thought I’d spin up a Mac instance to have a look.

First it’s worth nothing that Mac EC2 instances are not available in every AWS region yet and also they are bare metal instances (actual Mac Minis) and configured as Dedicated Hosts.

The regions they are available in are: North Virginia (us-east-1), Ohio (us-east-2), Oregon (us-west-2), Ireland (eu-west-1) and Singapore (ap-southeast-1).

In order to gain access to a Dedicated Host, it may be necessary to increase your Service Quotas within AWS, this is very easy to do within the Service Quotas console. My request took AWS just under 24 hours to turn around, and now I have a quota for 1 Running Dedicated mac1 host, in Ireland (eu-west-2). Remember that Service Quotas are regional, so request the mac1 instance where you need it!

In the EC2 console, under ‘Launch Instance’ and then filtering by ‘mac’ the following Amazon Machine Images (AMIs) are listed:

The only instance type, at the time of writing, is mac1.metal, consisting of 12 vCPUs and 32 GiB memory – this is a physical Intel based Mac Mini (M1 based Mac Minis are in development):

macOS Catalina (10.15.7) and macOS Mojave (10.14.6) are the operating systems that are currently available. macOS Big Sur support is coming soon.

Having selected the instance type, the process pretty much the the same as for all EC2 instances, however as the Mac Mini is a dedicated host the instance must be assigned to it (on a 1:1 basis – 1 OS per dedicated host). Security groups are configured as usual, and you’ll need tcp/22 to connect via SSH to the instance, and also tcp/5900 if you want to connect to the desktop via VNC directly and unsecured and not via tunnelled SSH.

Once the instance is running, connect to it using SSH in the same way you would connect to a Linux instance:

ssh -i <ec2 instance private key.pem> ec2-user@<ip address>

If you want to use VNC to connect to the macOS instance you’ll need to set a password for the ec2-user:

sudo passwd ec2-user

Now configure VNC on the mac instance:

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
-activate -configure -access -on \
-configure -allowAccessFor -specifiedUsers \
-configure -users ec2-user \
-configure -restart -agent -privs -all

sudo /System/Library/CoreServices/RemoteManagement/ARDAgent.app/Contents/Resources/kickstart \
 -configure -access -on -privs -all -users ec2-user

On your local machine you can tunnel VNC via SSH:

ssh -L 5900:localhost:5900 -C -N -i <ec2 instance private key.pem> ec2-user@<ip address> &

open vnc://localhost

You should now see VNC open with the macOS desktop displayed:

You can login with the password you set above.

The desktop is not high resolution (1024×768) as this service is not designed for interactive usage, as that would not be compliant with the Apple software license.

Here you can see that the EBS volume is presented to the macOS instance, and although the internal SSD is still there it’s not used:

Here you can see that the internal SSD is not mounted: