AI coding agents on Amazon EC2 Mac: How Cognition scales Devin for macOS
Cognition launched macOS cloud environments on Amazon EC2 Mac bare metal hosts for Devin, deploying across six AWS Regions with under one minute startup times.
By Dillip Chowdary • Nov 20, 2026 • Source: AWS Architecture Blog

At a glance
- Product
- Devin for macOS
- Platform
- Amazon EC2 Mac bare metal
- Adoption
- Nearly 1,000 organizations in six weeks
- VM startup time
- Under one minute
- Fleet footprint
- Six AWS Regions
- Host limits
- Two guest VMs per host (macOS SLA)
In this post
Cognition launched dedicated macOS development environments on Amazon EC2 Mac bare metal instances for its autonomous software engineer, Devin, according to AWS Architecture Blog's report. Nearly 1,000 organizations adopted the macOS workspace capability within six weeks of deployment. The cloud infrastructure spans six AWS Regions, provisioning fresh virtual machines in under one minute, which Cognition estimates is 15 to 20 times faster than manual host configuration.
This report details the cloud architecture required to scale Apple silicon virtualization for autonomous development agents at enterprise capacity. It covers bare metal host allocation, block storage snapshots, custom network policy filtering, and automated desktop permission provisioning. Systems architects and engineering teams can use these implementation patterns to structure reliable macOS virtualization fleets for continuous integration pipelines and autonomous coding workloads.
01Xcode environments and behavioral application testing
Devin Cloud originally executed coding tasks exclusively within Linux and Windows virtual machines. While Devin generated valid Swift syntax in non-Apple environments, compiling binaries, invoking Xcode command-line tools, and launching the iOS Simulator required authentic macOS hardware. The agent previously relied on client continuous integration pipelines or customer-owned Mac hardware to build and test applications.
Compiling code successfully does not verify interactive application behavior, requiring agents to test multi-step execution lifecycles inside real simulators. Testing persistent game state illustrates this verification sequence:
- Play session Run the game binary and advance through active gameplay.
- Pause state Trigger a pause event during the running session.
- Quit application Terminate the active mobile application process entirely.
- Relaunch app Reopen the application binary inside the simulator.
- Confirm state Verify that gameplay resumes from the saved point.
Every macOS workspace must preserve developer modifications without leaving idle virtual machines running continuously. Workspaces also enforce granular network access control policies, provision ready-to-code toolchains before tasks begin, and supply responsive visual streaming interfaces. These capabilities permit both human supervisors and autonomous agents to observe and manipulate running software simultaneously.
02Bare metal Apple silicon Dedicated Hosts
Cognition required physical Apple hardware to support macOS virtualization while avoiding the operational overhead of purchasing, racking, and maintaining on-premises server racks. Amazon EC2 Mac instances solve this operational bottleneck by pairing physical Mac mini and Mac Studio computers with the AWS Nitro System. This architecture lets engineers run the native Apple Virtualization framework in cloud environments identically to on-premises hardware.
Infrastructure engineers allocate physical host capacity and spin up Mac instances directly through the Amazon EC2 API instead of ordering physical hardware. The fleet operates across six AWS Regions, enabling low-latency execution and geographic distribution for distributed engineering teams. The bare metal instances integrate with standard Amazon VPC networking topologies and mount boot volumes directly from Amazon EBS.
Running virtual machines on top of bare metal Apple silicon ensures full access to hardware-accelerated graphics and native virtualization instructions. The Nitro controller offloads networking, storage, security monitoring, and host management tasks from the host processor. This separation leaves Apple silicon processors fully available for guest macOS virtualization, Xcode compilation jobs, and simulator runtimes.
03Host allocation and guest machine limits
Advertisement
Tech Pulse Daily
Get tomorrow's pulse first
Join engineers who read Tech Pulse before stand-up. Free, weekday mornings.
Amazon EC2 Mac instances run on Dedicated Hosts subject to a mandatory minimum allocation period of 24 hours. Because individual developer coding sessions are short and unpredictable, Cognition completely decouples session lifespans from underlying hosts. In AWS Regions lacking preallocated capacity pools, Cognition deploys Amazon EC2 Auto Scaling groups to provision and release Dedicated Hosts dynamically.
Note: The macOS Software License Agreement permits up to two additional copies of macOS to run in virtual operating system environments on each physical Apple machine. macOS enforces this licensing limit at the operating system level, restricting each bare metal host to two active guest workspaces.
A centralized VM manager running on each host invokes the Apple Virtualization framework to launch isolated guest environments from managed disk images. Whenever a Devin session enters an idle state, it releases its virtual machine so another pending session can execute immediately. This rapid recycling mechanism allows a single physical host to serve multiple customer development sessions daily.
04Block storage persistence and session snapshots
Developer interactions with Devin Cloud are largely asynchronous, meaning active coding sessions alternate between periods of agent computation and developer review. Keeping a virtual machine running while waiting for user instructions would waste scarce Apple silicon host capacity. Cognition deploys an independent background storage process on each host that intercepts and manages virtual machine disk input and output directly.
While Linux guests attach to storage engines via vhost-user, the Apple Virtualization framework lacks vhost-user support and requires Network Block Device attachments instead. Cognition built an NBD frontend for its snapshot manager, maintaining identical underlying storage mechanisms across operating systems. When a guest shuts down, the storage daemon flushes dirty writes and uploads differential disk snapshots to Amazon S3.
Cognition reports that approximately 90 percent of Devin sessions relinquish their macOS virtual machines when entering an idle state, resuming from stored snapshots in seconds. A single task typically frees and reclaims virtual compute resources multiple times across its execution lifecycle. This snapshot design guarantees that expensive bare metal Mac capacity remains dedicated exclusively to active development work.
05User space gateways and preconfigured images
Connecting guest virtual machines to host network interfaces requires balancing tenant isolation, setup complexity, and outbound security policy enforcement. The Apple Virtualization framework provides three native network attachment mechanisms, each presenting distinct operational tradeoffs for enterprise agent environments:
| Mode | Architecture | Selection Reason |
|---|---|---|
| Bridged | Direct interface binding | Lacks host filtering controls |
| NAT | Kernel pf management | Conflicted with custom pf rules |
| File-handle | Unix datagram socket | Selected for custom user-space gateway |
Cognition selected the file-handle attachment mode and implemented a dedicated user-space Ethernet gateway for each virtual machine. This gateway handles Address Resolution Protocol requests, validates Ethernet addressing, and verifies that outgoing source IP addresses match assigned values. Filtered IP packets flow into host tunnel interfaces, where macOS packet filter rules and proxy daemons enforce session egress restrictions.
To eliminate interactive authorization dialogs that would block headless agents, Cognition mounts guest disk images on the host prior to first boot. The deployment system creates the primary user account and writes configuration records directly into macOS internal databases, pre-authorizing accessibility and screen recording permissions. Once initialized, the guest streams desktop video to user browsers while Devin inspects accessibility trees via accessibility-cli.
Frequently asked questions
Why does Devin require macOS environments instead of Linux?
Compiling, signing, and testing Apple apps requires Xcode and genuine Apple hardware. Operating on macOS allows Devin to run the iOS Simulator and verify interactive application behavior before completing tasks.
How does Cognition handle the 24-hour host allocation minimum?
Cognition decouples ephemeral session lifespans from host lifespans by running guest virtual machines. Amazon EC2 Auto Scaling groups dynamically provision and release Dedicated Hosts across regions as needed.
How many virtual machines run per EC2 Mac host?
Each bare metal host runs two isolated workspaces concurrently. This limit complies with the macOS Software License Agreement, which allows two virtual copies of macOS on Apple hardware.
Sources
Author
Dillip Chowdary
Writes Tech Bytes coverage of AI, engineering, and the tools that actually ship. Editor of Tech Pulse Daily.
Related on Tech Bytes
Advertisement