AWSAdam HeschExplainer
AI coding agents on Amazon EC2 Mac: How Cognition scales Devin for macOS
Summary
Cognition gave Devin, its AI software engineer, the ability to build and test Apple apps by running macOS environments on Amazon EC2 Mac instances. Each Devin session gets a fresh macOS virtual machine in under a minute, using a fleet of EC2 Mac hosts across six AWS Regions. Disk snapshots preserve session state so idle VMs can be released and reclaimed in seconds, with about 90% of sessions resuming from a snapshot. A user-space Ethernet gateway enforces per-session network policies, and Devin interacts with apps through the accessibility tree and screenshots. Within six weeks of launch, nearly 1,000 organizations were running Devin on macOS, and Wispr reported a nearly 2x improvement in development velocity.
Context
Cognition needed to give Devin, its AI software engineer, the ability to build, test, and sign Apple apps, which requires macOS and Xcode. Before this launch, Devin Cloud ran only on Linux and Windows VMs and depended on a customer’s CI system or Mac fleet for builds and tests. Cognition chose Amazon EC2 Mac instances to avoid buying and managing physical Mac hardware while gaining API-driven capacity, multi-Region availability, and standard AWS networking and storage.
Approach / What changed
Cognition runs macOS guest VMs on Amazon EC2 Mac bare metal instances using the Apple Virtualization framework. Each session gets a fresh VM from a prepared image. Disk snapshots preserve session state so idle VMs can be released and reclaimed in seconds. A user-space Ethernet gateway enforces per-session network policies. Devin interacts with the app through an accessibility tree and screenshots, not pixels.
Takeaways
Cognition runs macOS guest VMs on EC2 Mac bare metal instances using the Apple Virtualization framework, with each host serving two isolated workspaces per the macOS SLA.
Disk snapshots allow idle Devin sessions to release their VM and resume from a snapshot in seconds, so about 90% of sessions free and reclaim their Mac VM multiple times a day.
Devin interacts with iOS apps in the simulator via the accessibility tree (using accessibility-cli) for control queries and actions, plus screenshots for visual verification.
FAQ
How does Cognition run multiple macOS workspaces on one EC2 Mac host?
Cognition uses the Apple Virtualization framework to run macOS guest VMs on EC2 Mac bare metal instances. Each host runs two isolated workspaces, as the macOS SLA allows up to two additional copies of macOS in virtual environments per Mac.
How does Cognition handle idle Devin sessions on macOS?
When a session becomes idle, the VM is shut down and its disk snapshot is uploaded to Amazon S3. The VM manager waits for the upload to finish before cleanup. About 90% of sessions give up their Mac VM when idle and resume from a snapshot in seconds, so capacity goes to active work.
How does Devin interact with an iOS app running in the simulator?
Devin uses the accessibility tree from the open-source accessibility-cli project to observe and interact with the app. It queries for a control by role and name, receives a reference, and then acts on that reference (e.g., pressing a button). Screenshots are used to check visual appearance, such as game state.
Source and freshness
- Source
- aws.amazon.com
- Published
- Added to Yomu
Summaries are generated from the original by a language model. Check the original before relying on it.
Keep reading
Related reading
The Good Stuff
Paid picks we use ourselves. Links carry a referral code — a subscription through one earns us a commission at no extra cost to you.
The best engineering reads, once a week
One useful email. Unsubscribe anytime.