Automation

How Cognition Runs Devin AI Agent on EC2 Mac Instances at Scale

The AI software engineer now builds and tests iOS apps in cloud-based macOS environments, serving nearly 1,000 organizations within six weeks of launch.

Omega Editorial · November 20, 2026 · 3 min read

Key takeaways

  • Cognition deployed Devin on EC2 Mac instances across six AWS regions, serving nearly 1,000 organizations within six weeks of launch in September 2024.
  • Each EC2 Mac Dedicated Host runs two isolated macOS VMs simultaneously, with sessions releasing VMs when idle and resuming from S3-backed snapshots in seconds.
  • Devin controls iOS apps through accessibility trees rather than pure screenshot analysis, enabling faster and more reliable verification of app behavior.
  • Pre-configured guest images eliminate permission dialogs and setup delays, allowing new sessions to start building and testing immediately after VM launch.
  • Wispr reported 70% reduction in code review time and nearly 2x velocity improvement using Devin for end-to-end iOS testing.

When Cognition needed to expand Devin's capabilities to include Apple app development, the company faced a fundamental constraint: building, testing, and signing iOS and macOS applications requires both Apple hardware and macOS, regardless of whether a human or AI writes the code.

Cognition's solution was to deploy macOS environments on Amazon EC2 Mac instances, enabling Devin to build iOS apps, run them in the iOS Simulator, and verify behavior before delivering production-ready code. Within six weeks of the September 2024 launch, nearly 1,000 organizations were running Devin on macOS, according to details first reported by AWS.

Why it matters

This deployment demonstrates how AI coding agents require more than just compute power—they need complete development environments that mirror human workflows. The ability to spin up isolated macOS workspaces in under a minute, compared to 15–20 times longer for physical Mac setup, removes a major bottleneck for organizations adopting AI-assisted development for Apple platforms.

Architecture for ephemeral Mac workspaces

Cognition runs Devin sessions on EC2 Mac bare metal instances distributed across six AWS regions. Each Dedicated Host runs two isolated macOS guest virtual machines simultaneously, the maximum permitted under Apple's software license agreement.

The architecture separates session lifecycles from host lifecycles. Because EC2 Mac Dedicated Hosts have a 24-hour minimum allocation period, Cognition built a VM manager using Apple's Virtualization framework to run multiple Devin sessions per host throughout the day. When a session goes idle, it releases its VM for other sessions to use.

Cognition reports that approximately 90 percent of sessions relinquish their Mac VM when idle and resume from snapshots in seconds. On average, sessions free and reclaim VMs multiple times, maximizing utilization of Mac capacity.

Technical implementation details

The system maintains session state through disk snapshots stored in Amazon S3, using a Network Block Device frontend that handles disk I/O while guests run. When a VM shuts down, the storage process continues running to persist writes and upload the updated snapshot before cleanup completes.

For network isolation, Cognition built a user-space Ethernet gateway that applies session-specific access rules. Each VM connects via a file-handle attachment that exchanges raw Ethernet frames over a Unix datagram socket, giving Cognition full control over packet filtering without conflicts with macOS's built-in packet filter.

Guest images are pre-configured before first boot. Cognition mounts the disk on the host to create user accounts, set permissions, and configure accessibility and screen recording access—eliminating permission dialogs that would otherwise block automated workflows. Images are then booted once to install Xcode, warm up the iOS Simulator, and complete background indexing.

Enabling AI control of native apps

Devin interacts with iOS apps through the accessibility tree rather than relying solely on screenshots. This approach, built on the open-source accessibility-cli project from Dioxus, allows Devin to query controls by role and name, act on specific references, and verify state changes efficiently.

Wispr, which develops a voice dictation app, reported that Devin's macOS support cut code review time by 70 percent and nearly doubled development velocity by enabling end-to-end testing of iOS features including audio and keyboard extensions.

These implementation details were originally published by AWS in a technical architecture blog post by the Cognition team.

  • #ec2-mac
  • #ai-coding-agents
  • #devin
  • #macos-virtualization
  • #ios-development
  • #cognition

This is an original analysis by the Omega editorial team. Source reporting: AI Watch.

Want systems like this working for your business?

Book a Call

More in Automation