Home > Uncategorized > Running #Mac on #AWS

Running #Mac on #AWS

Running Mac on AWS isn’t that new, it’s been available since 2020, however, it’s a useful cost-saver for developers looking to create an iOS app without purchasing a Mac. Using this approach, you can create a remotely-accessible Mac that you can turn on and off when you need it. Theoretically, costing about $1 an hour (Effetively, the host needs to be reserved for 24 hours, so it’s more like $24 a day), which makes it more or less like the MacInCloud offering of $30 a day.

Before you can create a Mac Ec2 Instance, you need to create a Mac Dedicated host. Once this is created, you can create a Mac Ec2 Instance and apply it to the host. Once created, you can connect to it using a VNC Client (Assuming you want a GUI interface)

Copy/Pasting from AWS help, here is how you connect via VNC from Windows

2.    Run the following command to install and start VNC (macOS screen sharing SSH) from the Mac instance

sudo defaults write /var/db/launchd.db/com.apple.launchd/overrides.plist com.apple.screensharing -dict Disabled -bool false
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.screensharing.plist

3.    Run the following command to set a password for ec2-user:

sudo /usr/bin/dscl . -passwd /Users/ec2-user

4.    [ON YOUR WINDOWS PC] Create an SSH tunnel to the VNC port. In the following command, replace keypair_file with your SSH key path and with your instance’s IP address or DNS name.

ssh -i keypair_file -L 5900:localhost:5900 ec2-user@

Note: The SSH session should be running while you’re in the remote session.

5.    Using a VNC client, connect to localhost:5900.

And then you can go ahead and install XCode and your App source code.

Don’t forget to de-allocate your dedicated host after stopping your ec2 instance, otherwise you’ll have a huge bill at the end of the month!

The overall experience is much more “clunky” and slow than a real Mac, it’s not much of a substitute, and the risk that if you forget the de-allocate the dedicated host, then it’ll cost you more than a mac itself in AWS fees.

Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: