Announcing Amazon EC2 M4 and M4 Pro Mac Instances | Amazon Web Services

As someone who has been using macOS since 2001 and Amazon EC2 Mac instances since their launch 4 years ago, I have helped many customers expand their Continuous Integration and Delivery (CI/CD) pipelines on AWS. Today, I’m excited to share that Amazon EC2 M4 and M4 Pro Mac instances are now generally available.

Development teams building apps for Apple platforms need powerful computing resources to handle complex build processes and run multiple iOS simulators simultaneously. As development projects grow and become more sophisticated, teams require more performance and memory capacity to maintain rapid development cycles.

Apple M4 Mac mini at its core
EC2 M4 Mac instances (aka mac-m4.metal v API) are built on Apple M4 Mac mini computers and are built on AWS Nitro. They feature Apple M4 silicon chips with a 10-core CPU (four performance and six efficiency cores), a 10-core GPU, a 16-core Neural Engine and 24GB of unified memory, delivering improved performance for iOS and macOS app development workloads. When building and testing applications, M4 Mac instances provide up to 20 percent better application build performance compared to EC2 M2 Mac instances.

EC2 M4 Pro Mac (mac-m4pro.metal in the API) instances are powered by Apple M4 Pro silicon chips with a 14-core CPU, 20-core GPU, 16-core Neural Engine and 48 GB of unified memory. These instances offer up to 15 percent better application build performance compared to EC2 M2 Pro Mac instances. Increased memory and processing power allow multiple tests to be run in parallel using multi-device simulators.

Each Mac M4 and M4 Pro instance now comes with 2 TB of local storage, providing low-latency storage for better caching and build and test performance.

Both instance types support macOS Sonoma version 15.6 and later as Amazon Machine Images (AMI). AWS Nitro provides up to 10 Gbps of Amazon Virtual Private Cloud (Amazon VPC) bandwidth and 8 Gbps of Amazon Elastic Block Store (Amazon EBS) storage via high-speed Thunderbolt connectivity.

Amazon EC2 Mac instances integrate seamlessly with AWS services, meaning you can:

Let me show you how to get started
You can launch an EC2 M4 or M4 Pro Mac instance through the AWS Management Console, the AWS Command Line Interface (AWS CLI), or the AWS SDKs.

For this demo, we will launch an instance of M4 Pro from the console. First, I allocate a dedicated host to run my instances. I then switch to EC2 on the AWS Management Console Dedicated hostsand I choose Allocate a dedicated host.

Then I enter a Label and I choose Instance family (mac-m4pro) and an A typical example (mac-m4pro.metal). I choose one Availability zone and I will clean Host maintenance.

EC2 Mac M$ - Dedicated hosts

Alternatively, I can use the command line interface:

aws ec2 allocate-hosts                          \
        --availability-zone-id "usw2-az4"       \
        --auto-placement "off"                  \
        --host-recovery "off"                   \
        --host-maintenance "off"                \
        --quantity 1                            \
        --instance-type "mac-m4pro.metal"

After the dedicated host is assigned to my account, I select the host I just assigned and then select the host Action menu and select Start the instance(s) on the host.

Note that the console also provides you with, among other information The latest supported versions of macOS for this host type. In this case, it’s macOS 15.6.

EC2 Mac M4 - Running dedicated hosts

On the Launch Instance page, I enter a Name. I chose macOS Sequoia Amazon Machine Image (AMI). I make sure that Architecture is a 64-bit Arm and A typical example is mac-m4pro.metal.

The remaining parameters are not specific to Amazon EC2 Mac: network and storage configuration. When launching an instance for development use, make sure you select a volume with at least 200 Gb or more. The default volume size of 100 GB is not enough to download and install Xcode.

EC2 Mac M4 - Details on running dedicated hostsWhen I’m ready, I’ll choose Start the instance orange button at the bottom of the page. Instances quickly appear as Run in the console. However, it may take up to 15 minutes to allow you to connect via SSH.

Alternatively, I can use this command:

aws ec2 run-instances \
    --image-id "ami-000420887c24e4ac8"  \ # AMI ID depends on the region !
    --instance-type "mac-m4pro.metal"   \
    --key-name "my-ssh-key-name"        \
    --network-interfaces '{"AssociatePublicIpAddress":true,"DeviceIndex":0,"Groups":("sg-0c2f1a3e01b84f3a3")}' \ # Security Group ID depends on your config
    --tag-specifications '{"ResourceType":"instance","Tags":({"Key":"Name","Value":"My Dev Server"})}' \
    --placement '{"HostId":"h-0e984064522b4b60b","Tenancy":"host"}' \ # Host ID depends on your config 
    --private-dns-name-options '{"HostnameType":"ip-name","EnableResourceNameDnsARecord":true,"EnableResourceNameDnsAAAARecord":false}' \
    --count "1" 

Install Xcode from the terminal
Once the instance is reachable, I can SSH into it and install my development tools. I use xcodeinstall to download and install Xcode 16.4.

From my laptop, I’ll open a session with my Apple developer credentials:

# on my laptop, with permissions to access AWS Secret Manager
ยป xcodeinstall authenticate -s eu-central-1                                                                                               

Retrieving Apple Developer Portal credentials...
Authenticating...
๐Ÿ” Two factors authentication is enabled, enter your 2FA code: 067785
โœ… Authenticated with MFA.

I’m connecting to the EC2 Mac instance I just launched. Then I download and install Xcode:

ยป ssh ec2-user@44.234.115.119                                                                                                                                                                   

Warning: Permanently added '44.234.115.119' (ED25519) to the list of known hosts.
Last login: Sat Aug 23 13:49:55 2025 from 81.49.207.77

    โ”Œโ”€โ”€โ”€โ”ฌโ”€โ”€โ”   __|  __|_  )
    โ”‚ โ•ทโ•ญโ•ฏโ•ท โ”‚   _|  (     /
    โ”‚  โ””โ•ฎ  โ”‚  ___|\___|___|
    โ”‚ โ•ฐโ”€โ”ผโ•ฏ โ”‚  Amazon EC2
    โ””โ”€โ”€โ”€โ”ดโ”€โ”€โ”˜  macOS Sequoia 15.6

ec2-user@ip-172-31-54-74 ~ % brew tap sebsto/macos
==> Tapping sebsto/macos
Cloning into '/opt/homebrew/Library/Taps/sebsto/homebrew-macos'...
remote: Enumerating objects: 227, done.
remote: Counting objects: 100% (71/71), done.
remote: Compressing objects: 100% (57/57), done.
remote: Total 227 (delta 22), reused 63 (delta 14), pack-reused 156 (from 1)
Receiving objects: 100% (227/227), 37.93 KiB | 7.59 MiB/s, done.
Resolving deltas: 100% (72/72), done.
Tapped 1 formula (13 files, 61KB).

ec2-user@ip-172-31-54-74 ~ % brew install xcodeinstall 
==> Fetching downloads for: xcodeinstall
==> Fetching sebsto/macos/xcodeinstall
==> Downloading https://github.com/sebsto/xcodeinstall/releases/download/v0.12.0/xcodeinstall-0.12.0.arm64_sequoia.bottle.tar.gz
Already downloaded: /Users/ec2-user/Library/Caches/Homebrew/downloads/9f68a7a50ccfdc479c33074716fd654b8528be0ec2430c87bc2b2fa0c36abb2d--xcodeinstall-0.12.0.arm64_sequoia.bottle.tar.gz
==> Installing xcodeinstall from sebsto/macos
==> Pouring xcodeinstall-0.12.0.arm64_sequoia.bottle.tar.gz
๐Ÿบ  /opt/homebrew/Cellar/xcodeinstall/0.12.0: 8 files, 55.2MB
==> Running `brew cleanup xcodeinstall`...
Disable this behaviour by setting `HOMEBREW_NO_INSTALL_CLEANUP=1`.
Hide these hints with `HOMEBREW_NO_ENV_HINTS=1` (see `man brew`).
==> No outdated dependents to upgrade!

ec2-user@ip-172-31-54-74 ~ % xcodeinstall download -s eu-central-1 -f -n "Xcode 16.4.xip"
                        Downloading Xcode 16.4
100% (============================================================) 2895 MB / 180.59 MBs
( OK )
โœ… Xcode 16.4.xip downloaded

ec2-user@ip-172-31-54-74 ~ % xcodeinstall install -n "Xcode 16.4.xip"
Installing...
(1/6) Expanding Xcode xip (this might take a while)
(2/6) Moving Xcode to /Applications
(3/6) Installing additional packages... XcodeSystemResources.pkg
(4/6) Installing additional packages... CoreTypes.pkg
(5/6) Installing additional packages... MobileDevice.pkg
(6/6) Installing additional packages... MobileDeviceDevelopment.pkg
( OK )
โœ… file:///Users/ec2-user/.xcodeinstall/download/Xcode%2016.4.xip installed

ec2-user@ip-172-31-54-74 ~ % sudo xcodebuild -license accept

ec2-user@ip-172-31-54-74 ~ % 

EC2 Mac M4 - install xcode

Things you should know
Select an EBS volume with at least 200 Gb for development purposes. The default volume size of 100 GB is not enough to install Xcode. I usually choose 500 Gb. When you increase the size of the EBS volume after launching the instance, remember to resize the APFS file system.

Alternatively, you can choose to install the development tools and framework on the local 2 TB low-latency SSD available in the Mac mini. Note that the contents of this volume are bound to the instance lifecycle, not the dedicated host. This means that when the instance is stopped and restarted, everything is deleted from the internal SSD storage.

Teamac-m4.metal and mac-m4pro.metal instances support macOS Sequoia 15.6 and later.

You can migrate existing EC2 Mac instances when the migrated instance is running macOS 15 (Sequoia). Create a custom AMI from your existing instance and launch an M4 or M4 Pro instance from that AMI.

Finally, I recommend checking out the tutorials I’ve written to help you get started with Amazon EC2 Mac:

Price and availability
EC2 M4 and M4 Pro Mac instances are currently available in US East (N. Virginia) and US West (Oregon), with additional regions planned in the future.

Amazon EC2 Mac instances can be purchased as dedicated hosts through the On-Demand and Savings Plans pricing models. EC2 Mac instances are billed per second with a 24-hour minimum allocation period to comply with the Apple macOS software license agreement. At the end of the 24-hour minimum assignment period, the host may be released at any time without further commitment

As someone who works closely with Apple developers, I’m curious to see how you use these new instances to accelerate development cycles. The combination of increased performance, improved memory capacity, and integration with AWS services opens up new possibilities for teams building apps for iOS, macOS, iPadOS, tvOS, watchOS, and visionOS platforms. Beyond application development, Apple’s Neural Engine silicon makes these instances cost-effective candidates for running machine learning (ML) tasks. I will discuss this topic in detail at AWS re:Invent 2025, where I will share benchmarks and best practices for optimizing ML workloads on EC2 Mac instances.

To learn more about EC2 M4 and M4 Pro Mac instances, visit the Amazon EC2 Mac Instance page or read the EC2 Mac documentation. You can start using these instances today to modernize your Apple development workflows on AWS.

โ€” self

Leave a Comment