AWS Emulator 正式发布:当 AI 智能体编写代码时,软件工程师的角色如何演变?
作者: Werner Vogels & Swami Sivasubramanian
发布日期: 2026年11月11日
核心主题: 分布式系统仿真演进、AI 智能体自主开发与现代工程师的新型守门人角色
文章背景与核心概要
在分布式系统工程中,如何以低成本、确定性的方式验证复杂并发一致性一直是系统工程的核心难题。Amazon 从早期基于 Paxos 一致性协议、运行在单进程 Java 虚拟机 (JVM) 中的“Alf”锁服务仿真器起步,逐步演化出如今支撑 S3、DynamoDB 等 200 多个云服务的庞大分布式架构。面对传统手动为每个服务构建测试桩耗时数年的瓶颈,AWS 让 AI 智能体 (AI Agent) 以公开的 Smithy 接口模型为蓝图,结合真实云端运行环境进行双向比对验证,全自主编写并推出了可本地免费离线运行的 AWS 仿真器 (AWS Emulator)。当编写与调试代码的工作逐步交由 AI 智能体接管,软件工程师的核心职责正迎来历史性蜕变——从底层的业务代码编写者,跃升为系统架构规范的制定者、高保真仿真环境的搭建者,以及严密代码准入门禁的守门人。
📌 执行概要
📌 Executive Summary
本文深入探讨了 Amazon 分布式系统测试方法的演进历程——从早期类似“Alf”分布式锁服务的手工仿真环境,跨越到当下自主编码 AI 智能体 (AI Agent) 唱主角的新时代。这一演进的高潮,正是 AWS 仿真器 (AWS Emulator) 的正式发布。这是一款完全由 AI 智能体独立编写而成的开发利器,能为全球开发者在本地提供一套完全免费、支持离线运行且涵盖 200 多个 AWS 核心云服务的本地仿真镜像。
This article explores the evolution of distributed systems testing at Amazon—from early hand-built simulations like the "Alf" lock service to the modern era of autonomous AI coding agents. It marks the launch of the AWS Emulator, a tool written entirely by AI agents that provides developers with a local, free, offline copy of over 200 AWS services.
文章的核心观点与主要看点如下:
Key takeaways include:
- 测试范式的演进:测试手段从成本高昂且难以横向扩展的物理混沌工程,逐步过渡到确定性的本地仿真模拟,最终步入今天由 AI 智能体驱动的自适应闭环验证。
- 智能体自主开发突破:AI 智能体直接利用 Smithy 公共 API 接口规范,并调用真实 AWS 线上端点反复对比校准,以传统软件工程无可比拟的速度自主构建出了完整的 AWS 仿真器。
- 软件工程师角色的重塑:当日常写代码的任务交由智能体接管后,现代软件工程师的核心职责转变为设计严苛的系统规范、仿真测试环境、安全护栏以及自动化的代码合并门禁 (Merge Gate)。
- The Testing Evolution: Moving from expensive, hard-to-scale physical chaos testing to deterministic local simulations and now AI-driven agent verification.
- Autonomous Agent Development: How AI agents utilized public API models (Smithy) and real AWS endpoints to autonomously build the AWS Emulator in a fraction of traditional timelines.
- The Changing Engineering Role: When agents write the code, the modern software engineer’s primary responsibility shifts to designing rigorous guardrails, test environments, specifications, and automated merge gates.
💬 [原文引用 / Original Quote]: “2004年,我刚入职 Amazon 刚满一个月,就获得了一个为自己团队挑选一名实习生的机会……” —— Werner Vogels
In 2004, barely a month into my new job at Amazon, I got the opportunity to pick an intern to join my team... — Werner Vogels
AWS 分布式系统测试的起源
The Origins of Distributed Systems Testing at AWS
大约二十年前,Werner 安排 Swami 与 Amazon 早期工程师 Al Vermeulen 合作,共同研发一款名为 “Alf” 的分布式锁服务。Alf 基于经典的一致性算法 Paxos 构建,后来成为了支撑 S3 和 DynamoDB 等极其复杂的大规模分布式系统的核心底层“可信数据源 (Truth Store)”。
About twenty years ago, Werner asked Swami to work with early Amazon engineer Al Vermeulen on a distributed lock service called "Alf". Built on Paxos, Alf became the underlying truth store powering complex distributed systems like S3 and DynamoDB.
分布式系统的测试之痛
Distributed Systems Are Hard to Test
尽管 Paxos 一直被奉为分布式共识协议的黄金标准,但在发生网络分区 (Network Partition) 时,要让它既能承载数以万计并发客户端的巨量请求,又能严密保持数据强一致性,在工程实践中依然面临着难以想象的巨大挑战。
While Paxos is the gold standard for consensus protocols, scaling it to handle tens of thousands of simultaneous clients during network partitions while maintaining strict consistency was a massive challenge.
- 传统测试手段的局限性:早期的测试严重依赖大规模端到端系统集成测试与混沌工程 (Chaos Engineering)。然而,这些方法不仅资源开销巨大,难以按需复现极端边界场景,而且在排查极其隐蔽的并发死锁与竞争状态时显得力不从心。
- 单进程仿真模拟的破局:为了彻底攻克这一难题,研发团队将多个 Alf 节点全部运行在同一个 JVM 中,在一个完全可控的单进程程序内对底层网络和基础设施依赖进行全方位仿真。这让工程师能够随心所欲地主动丢包、注入故障,并精确验证任意交错的事件时序;同时,他们还结合了 TLA+ 等形式化验证工具进行严谨的数学推演。
- Traditional Limitations: Early testing relied on large-scale system testing and chaos engineering. However, these methods were expensive, difficult to reproduce on demand, and struggled with concurrency bugs.
- The Simulation Breakthrough: To solve this, the team ran Alf servers inside a JVM, simulating the network and infrastructure dependencies in a single controllable program. This allowed them to intentionally drop packets, inject faults, and test various event orderings alongside formal reasoning techniques like TLA+.
告别纯手工打造的测试环境
Outgrowing Hand-Built Test Environments
当 AWS 刚刚起步、仅有寥寥数个基础服务时,人工手写单进程仿真系统还能应付得来;但如今,整个 AWS 生态已经扩展至 200 多项庞大复杂的云服务。如果要为每一个云服务都手动编写仿真环境,恐怕要耗费数年甚至数十年的工期——尤其是在如今 AI 智能体写代码的速度早已大幅超越人类团队审查与合并代码速度的新常态下,传统的人工做法更难以为继。
While manual simulation worked when AWS consisted of a handful of services, today's ecosystem spans over 200 services. Building manual test environments for each one would take years—especially now that AI agents write code faster than traditional teams can merge it.
AWS Emulator 是如何诞生的?
How the AWS Emulator Was Born
AWS 开发者工具团队的高级首席工程师 Matt Goldberg 提出了一个大胆的假设:只要为 AI 智能体提供详细完备的书面行为描述(即规范文档),并以真实的云端真实环境作为对齐校验的基准,智能体完全有能力自主构建出一个高度可用的仿真云服务版本:
Matt Goldberg (Senior Principal Engineer on the AWS Developer Tools team) hypothesized that given written behavioral descriptions and the real cloud to check against, an agent could build a working service version autonomously:
- 统一接口规范 (The Specs):基于 Smithy(AWS 专门用于定义 API 操作、输入、输出与错误码的标准接口定义语言)编写的公开 API 模型。
- 真实环境双向校验 (The Verification):通过覆盖客户核心业务端到端的高保真测试用例,在真实的 AWS 线上生产环境与本地仿真器之间运行双向比对验证。
- 闭环自主执行 (The Execution):由自主 AI 智能体(例如 Kiro)进行高频循环迭代开发,不断编码、报错、调试、自我修复,直至本地仿真器的行为与真实 AWS 云端完全对齐。
- The Specs: Public API models written in Smithy (AWS’s format for operations, inputs, outputs, and errors).
- The Verification: End-to-end fidelity customer scenarios tested against the live AWS cloud.
- The Execution: Autonomous agents (such as Kiro) iteratively built and refined the emulator until it matched real AWS behavior.
由此诞生的 AWS Emulator,其内部所有代码完全由 AI 智能体独立编写并完成全套自测,现已完整覆盖超过 200 种 AWS 云服务。它不仅能在开发者的本地机器上完全免费、独立离线运行,还在代码合并准入流程中部署了全自动严格校验与对抗性安全审查智能体,构筑起了极其坚固的防御屏障。
The resulting AWS Emulator features code entirely written and tested by agents, covering over 200 AWS services. It runs locally and for free, guarded by automated checks and adversarial security agents in the merge gate.
将基础设施深植于编码循环之中
Infrastructure in the Coding Loop
编程智能体的核心工作流本质上是一个紧密的“行动-反馈”闭环:编写代码、运行执行、检查输出结果。但对于复杂的分布式系统而言,这种闭环要想跑通,底层必须有一套能够高度拟真真实世界运行特性的基础设施支撑。通过将 AWS Emulator 直接无缝嵌入到开发者的本地机器中,AI 智能体便拥有了即时检验自身代码效果的试验场,能够不间断地评估每一次改动,进而大幅提高“初次尝试即编写正确”的代码成功率。
Coding agents operate in an iterative loop: they write code, execute it, and inspect the results. For distributed systems, this loop requires underlying infrastructure that mimics real-world behavior. By embedding the AWS Emulator directly into the developer's local machine, agents can evaluate their own work continuously and produce correct code on their first attempt much more reliably.
当智能体包揽代码编写:软件工程师的真正使命
The Engineer's Job When Agents Write the Code
当智能体全面接管了繁重耗时的大规模代码编写与自动化自测之后,人类软件工程师的职业定位与核心价值正在发生根本性的蜕变:
When agents take over the heavy lifting of code writing and self-testing, the human engineer's role transforms fundamentally:
- 从编写代码转变为守护护栏:工程师的精力从逐行编写具体业务逻辑,转向设计清晰无歧义的架构规范、搭建高保真测试仿真环境,以及构筑定义系统“正确性”的自动化合并门禁。
- 高维统筹与上下文供给:缺乏优质上下文和测试环境,AI 智能体同样寸步难行。例如,当 Swami 尝试在没有任何规范文档和测试桩的情况下,用 Kiro 从头复现 Alf 的副本复制引擎时,智能体一度陷入死循环;然而,一旦给它配备了精确的规范定义和完整的测试基座,整个系统的重构工作在短短两个小时内便圆满告成。
- AI 时代的软件质量新范式:在 AI 智能体主导的新开发时代,软件工程的高质量不再依靠人工肉眼排查,而是依赖多层次的自动化防护网络——包括确定性的行为验证断言、对抗性安全审查智能体,以及严格的代码权限隔离边界,坚决杜绝智能体触碰或误改未经授权的系统核心。
- From Coding to Guardrails: Engineers focus on designing specs, test environments, and merge gates that define and verify correctness.
- Supervision and Context: For instance, when Swami attempted to rebuild Alf's replication engine using Kiro without a spec or test environment, progress stalled. Once equipped with proper specs and a testbed, the rebuild took a mere two hours.
- The New Era of Quality: Software quality in the AI era relies on multi-layered guardrails—including deterministic checks, security review agents, and strict permission boundaries that prevent agents from accessing unauthorized code.
发布要点与开源细节
What to Know at Launch
- 开源协议与授权许可:AWS Emulator 的全部源代码以 CC0 协议 (Creative Commons 0,即完全放弃版权、贡献给公共领域) 正式发布。
- 极致透明的研发历程:完整的 Git 代码提交历史,以及 AI 智能体在开发过程中自动提交、自问自答的全部 Issue 追踪记录,均已在 AWS Emulator GitHub 代码仓库 中面向全球公开。
- 坦率披露的边缘场景:代码仓库中还特意保留了一个专门的
things-that-do-not-work(当前尚未支持的行为清单)目录,清晰透明地列出了智能体当前的实现与真实 AWS 云端行为尚存细微差异的边界情况。
- Licensing: The AWS Emulator code is released under CC0 (Creative Commons dedication to the public domain).
- Transparency: The complete commit history and agent-filed issues are publicly available in the AWS Emulator GitHub Repository.
- Edge Cases: The repository includes a
things-that-do-not-workfolder tracking behaviors where agent implementations do not yet match real AWS.