Create an EC2 M1 Mac instances for macOS

RamkumarMrj
4 min readJul 20, 2022

--

AWS EC2 M1 Mac instance

EC2 M1 Mac instances are now generally available!

Last year re:Invent 2021 conference AWS EC2 Mac team announced that preview of a new EC2 M1 Mac instance to Build & Test Apps for iPhone, iPad, Mac, Apple Watch, and Apple TV. — on 30 November, 2020, AWS announced that intel CPU(mac1.metal) based EC2 macOS instance.

Now the team officially announced the general availability (GA) of Amazon EC2 M1 Mac instances for macOS. — on July 07, 2022, M1 Mac EC2 arrived, i.e., mac2.metal is available in particular regions only.

How to Launch an AWS EC2 M1 Mac Instance (macOS)

Firstly, these instance types must be launched onto Dedicated Hosts because these are physical Apple Mac minis. EC2 M1 Mac instances are available in the US East (N. Virginia), US West (Oregon), Europe (Dublin), and Asia Pacific (Singapore) AWS Regions, with additional Regions coming soon.

Note: On-Demand EC2 Mac Dedicated Hosts have a minimum host allocation and billing duration of 24 hours.

For dedicated hosts, there are three pricing models to choose from: on-demand pricing, reservation pricing, and a savings plan. For On-Demand, you pay for each second. pricing for mac2 is $0.65 per hr. and mac1 is $1.083 per hr.

Create Dedicated host for Mac Instance

  • Log in to AWS Console, type EC2 into the search bar (Alt+S), and then choose Dedicated Hosts from the left side menu.
EC2 Dedicated Hosts
  • Select a region and click the ‘Allocate Dedicated Host’ button.
  • For the Dedicated Host Settings page, select the following as input:
    - Instance family: mac1
    - Instance type:
    mac2.metal (available in a particular region only).
    - Quantity: 1
    - Name and Availability Zone: Your choice.
Allocating a Dedicated Host
  • Click ‘Allocate’ or use the CLI command.🎉
Creating mac1 Dedicated host

Note: If you face the below error during the allocation of a dedicated host, it means your account doesn’t have a request quota value.

Error message: Exceeded the current request limit

To solve this problem, request the quota to increase the limit.

  • In AWS console Search for Service Quotas.
  • Select Amazon Elastic Compute Cloud in the Service quota dashboard.
  • Locate and select ‘Running Dedicated mac1 Hosts.’
  • Under the recent quota increase requests, choose the ‘Request quota increase’ button on the right side corner.
  • Enter the total amount that you want the quota to be (value as 1) and click ‘Request’.

It may take 3–5 days, but remember the region and the request value must be a number greater than your current quota value.

Steps to create an EC2 M1 Mac Instance (macOS)

In the previous steps, we successfully created a Dedicated Host for an EC2 M1 Mac Instance. Now, we need to Launch a Mac Instance. For that, follow the below steps:

  • Go to EC2 service console
  • Under instances, click Launch Instances.
  • Choose an Amazon Machine Image (AMI) and click next.
    Supported Operating Systems are(2022):
    - macOS Monterey 12.4–64-bit (Mac)
    - macOS Big Sur 11.6.6–64-bit (Mac)
    - macOS Catalina 10.15.7–64-bit (Mac)
  • Choose an Instance family as mac1 and mac2.metal (verify the region you have selected) and click next.
  • Select Dedicated Host that we have already created and click Next.
  • Add storage you can leave it as is or increase the volume size.
  • Add the tag and click Next.
  • In security configuration, we need two rules. Custom TCP Rule(port range: 5900) and SSH (port range: 22) select My IP as source.
  • Click to Review and Launch. Choose existing keypair or create a new one, then click Launch Instances.

SSH for CLI login and to change the password for the default user
Custom TCP protocol for VNC connection

Connect Mac Instance using VNC Viewer

  • Download the VNC Viewer software and install it on your local machine.
  • In the EC2 Instance console, select the Mac instance and click Connect.
  • Navigate to the SSH tab. Read the instructions and copy the SSH public DNS command.
  • On your local machine, launch PowerShell and change directory to the keyPair file location and paste the SSH command.
    Ex: ssh -i “macKeyPair.pem” ec2-use@[DNS Name]
  • To start VNC, type the below command in PowerShell.
Enable VNC Connection
  • In VNC Viewer, create a New Connection, enter the public IP address of the Mac Instance and click Connect -> Continue to Insecure Connection.
  • Enter your username and password, then click OK to launch macOS. 🎉

Things to remember:

  • Verify the regions and estimate the total cost before the allocation of Dedicated Hosts and creation of Instances.
  • Terminate billing for any specific On-Demand Dedicated Host as soon as possible by releasing it.💰

--

--