Making Amazon Quick enterprise-ready: Automated, auditable cross-account resource promotion
https://aws.amazon.com/blogs/machine-learning/making-amazon-quick-enterprise-ready-automated-auditable-cross-account-resource-promotion/📌 讓 Amazon Quick 的 AI 助理資源「跨帳號升版」不再靠手動
TL;DR:AWS 用 Bedrock AgentCore 上的 MCP 伺服器,把 Amazon Quick 代理資源的跨帳號搬遷變成一鍵、可稽核流程。
企業導入 agentic AI 工具時,常常卡在一個很不「AI」的環節:怎麼把開發環境裡測好的代理,安全地搬到正式環境?Amazon Quick 團隊這次公開的解法,是用一個 MCP 伺服器把這整套手動搬遷流程自動化。
🤔 從開發帳號搬到正式帳號,原來要手動重建一次
Amazon Quick 是 Amazon 的 agentic AI 工作助理,使用者可以建立能呼叫 action connector、查詢知識庫、完成多步驟任務的代理(agents)。這類資源包括聊天代理、action connector、知識庫、flow 與 space。多數企業會把開發與正式環境拆成不同的 AWS 帳號(有些中間還有 QA 帳號),但在此之前,把這些資源從開發帳號「升版」到正式帳號,並沒有原生的一鍵機制:團隊得手動重建每一個代理(複製相同的指令與起始提示詞)、重新掛接每個代理的 action connector、重新授予資源權限,並重新佈建知識庫背後的 S3 bucket、bucket 政策與資料來源。這個過程慢、難以稽核,而且容易出現細微錯誤,直接影響企業要的治理(governance)要求。
🧩 三帳號架構 + 五個 MCP 工具,組成一套冪等(idempotent)搬遷流程
這套解法之所以可行,關鍵在於 Amazon Quick 的資源(space、agent、action connector、knowledge base、flow)都是透過 Amazon Quick API(屬於 Amazon QuickSight API 的一部分)管理,提供完整的 CRUD 與 list 操作,也就是說使用者在介面上設定的一切,理論上都能用程式碼讀取、重建、更新與治理,包括權限。
文章介紹的 Quick Resource Migrator,是一個部署在 Amazon Bedrock AgentCore runtime 上的範例 MCP 伺服器。架構採三帳號模型:一個中央 runner 帳號負責跑 MCP 伺服器,伺服器透過 AWS STS 分別在來源帳號假設唯讀角色、在目標帳號假設可讀寫角色,因此不需要在任何地方存放長期有效的憑證。
伺服器對外暴露五個工具(皆定義於 server.py):
preview_migration:傳入來源帳號、資源類型、選取方式(id/名稱/全部)與區域,回傳將被搬遷的資源清單;若同時指定目標帳號,還會標示每個資源是會被 CREATE 還是 UPDATE,作為搬遷前的 dry run 與變更管理審核依據。migrate_resources:傳入來源與目標帳號、資源類型、選取方式、區域、環境名稱與 QuickSight 服務角色名稱,執行完整的 create-or-update 搬遷,回傳建立、更新與授權內容的結構化報告,因為是冪等設計,可以在每次 release 重複執行,結果會收斂到相同的目標狀態。list_backups:列出每個資源在搬遷前寫入備份目錄的各版本快照。get_backup:取得指定資源與版本(預設為最新)的完整備份內容,包含設定與相依關係。restore_backup:將儲存的備份版本重新套用到目標資源上(更新或在資源已不存在時重建),且執行回復前會先對當前狀態做一次備份,確保回復動作本身也可逆。
這套工具可以透過 AWS CloudFormation 部署跨帳號 IAM 角色、VPC 網路,以及由 Cognito 驗證的 AgentCore runtime,再把這個 runtime 註冊成 Amazon Quick 的 action connector,之後就能用自然語言在 Amazon Quick 中直接驅動搬遷流程,或透過 repository 附帶的 app-builder 提示詞,快速生成一個點擊式的 Quick App 介面(選擇來源/目標帳號與要搬遷的資源、預覽變更、執行搬遷、檢視歷史記錄)。
💡 設計上刻意不支援「刪除」,把風險降到最低
這套遷移工具的一個關鍵設計選擇是:每次執行只會新增或更新資源,絕不對目標帳號發出刪除操作。每次更新前都會先把舊版本寫入 S3 做版本化備份,讓每個資源保有完整歷史可供檢視與回滾。對企業治理場景來說,這種「只增不刪+版本化備份+可回滾」的組合,比起單純的手動複製貼上,更貼近一般應用程式發布該有的可稽核性。
⚠️ 目前是範例專案,仍需要自行部署三套 CloudFormation 堆疊
這套工具目前以 aws-samples repository 的範例程式碼形式提供,要上線使用需要自行部署三套 CloudFormation 堆疊(跨帳號 IAM 角色、VPC 網路、AgentCore runtime),並手動完成 action connector 註冊等設定步驟,對團隊而言仍有一定的導入門檻。
🎯 給工程師的啟示:agentic AI 資源也該納入 CI/CD 式的發布流程
如果你的團隊正在用 Amazon Quick 建立代理與知識庫,這套做法提供了一個明確參考:把 AI 代理資源的升版當成一般應用程式發布來對待,用 API 驅動的 upsert、版本化備份與 dry-run 預覽取代手動複製,是在 agentic AI 工具逐漸進入企業生產環境後,治理與稽核不可或缺的一環。
🔗 來源
- 標題:Making Amazon Quick enterprise-ready: Automated, auditable cross-account resource promotion
- 作者/機構:Keshav Ganesh, AWS Machine Learning Blog
- 連結:https://aws.amazon.com/blogs/machine-learning/making-amazon-quick-enterprise-ready-automated-auditable-cross-account-resource-promotion/
#AmazonQuick #AWS #AgenticAI #MCP #BedrockAgentCore #CloudGovernance #DevOps #EnterpriseAI #Automation #CloudArchitecture
原始資料 AWS ML · 收集於 2026-10-05
摘要原文
Amazon Quick is Amazon’s agentic AI companion built for work. You build agents that reason over your data, call action connectors, and carry multi-step tasks to completion. Promoting those resources (chat agents, action connectors, knowledge bases, flows, and spaces) from a development to a production AWS account, the way you would any other application, has been a manual and error-prone chore. This post shows how to automate it with an idempotent, auditable Model Context Protocol (MCP) server on Amazon Bedrock AgentCore. The building blocks of an agentic solution are its agents, action connectors, knowledge bases, and spaces : chat agents configured with custom instructions, connectors for Slack, Jira, and other integrations, knowledge bases grounded in your own documents, and the Space that binds them together. Teams assemble and iterate on them quickly in a development account. Most enterprises run separate AWS accounts for development and production, sometimes with quality assurance (QA) in between. When agents, action connectors, and knowledge bases are validated in a development account, there is no native, one-click way to promote them into the next account. Teams rebuild each resource by hand: recreate each agent with the same instructions and starter prompts, re-attach each agent’s action connectors, re-grant resource permissions, and reprovision the Amazon Simple Storage Service (Amazon S3) bucket, bucket policy, and data source behind each knowledge base. The work is slow, difficult to audit, and easy to get subtly wrong, which undermines the governance story enterprises need. Amazon Quick resources are programmable. Spaces, agents, action connectors, knowledge bases, and flows are managed through the Amazon Quick API (part of the Amazon Quick Sight API surface ), which provides the full resource lifecycle, create, read, update, delete, and list. Anything a business user configures in Amazon Quick, an agent with its instructions and starter prompts, a connector, a knowledge base, or a flow, we can inspect, recreate, update, and govern programmatically, permissions included. This programmable surface is what makes governed promotion possible. Instead of recreating each resource by hand, we read a resource and its permissions through the API and reapply them in another account exactly as they were. The migrator in this post composes the create, read, update, and list operations into one repeatable workflow, and it never issues a delete against the target, so a run only adds or updates. In this post, we walk through the Quick Resource Migrator, a sample MCP server hosted on Amazon Bedrock AgentCore runtime, a capability of Amazon Bedrock AgentCore, that automates cross-account promotion of Amazon Quick resources in a single tool call. It’s resource-driven: you pick a resource type (agent, connector, knowledge base, flow, or space) and select by id, by name, or all. It’s idempotent (safe to re-run), and it copies permissions faithfully by describing the source and replaying the same actions in the target. The full source code is available in the aws-samples repository . The migrator promotes a chosen set of resources in a single call. It is an upsert: a resource that does not yet exist in the target is created, and one that already exists is updated in place. Every update is protected by a versioned backup written to Amazon S3 before the change, so each resource keeps a full history you can review and roll back to. A read-only preview reports exactly what a run would create or update before you commit, and the migration itself runs on Amazon Bedrock AgentCore, so it can be driven from Amazon Quick or any MCP-compatible client. The solution uses a three-account model. A central runner account hosts the MCP server on Amazon Bedrock AgentCore runtime. The server assumes a read-only role in the source account and a read-write role in the target account using AWS Security Token Service (AWS STS), so no long-lived credentials are stored anywhere. Figure 1: Architecture of the Amazon Quick Resource Migrator MCP server Table 1: Architectural components The server exposes five tools, all defined in server.py . preview_migration takes a source account ID, a resource type (agent, connector, knowledge base, flow, space, or all), a selector (id, name, or all), and an AWS Region. It returns an inventory of the agents, action connectors, knowledge bases, and flows that would be migrated, with names and types, without making any change. Use it as a dry run to confirm scope and to support a change-management approval step before promotion. When you also pass a target account ID, the response adds a source-to-target mapping that marks each resource CREATE or UPDATE, so you can see exactly what a migration would change before running it. migrate_resources takes source and target account IDs, a resource type (agent, connector, knowledge base, flow, or space), a selector (id, name, or all), a region, source and target environment names (used in the knowledge base bucket name), and the Quick Sight service role name. It performs the full create-or-update migration described above and returns a structured report of everything it created, updated, and granted, along with any errors. Because it’s idempotent, you can run it repeatedly, for example on every release, and it converges on the same target state. list_backups searches the backup catalog and lists the available versions for each asset. Backups are the pre-update snapshots the migrator writes to the backup bucket, one versioned object per update, so you can see the full history for any migrated resource. get_backup returns the full stored backup for a given asset and version (the latest by default), including the captured resource configuration and its dependencies. restore_backup re-applies a stored backup version onto the target resource, updating it in place, or recreating it if it no longer exists. It first takes a fresh pre-restore backup, so the revert is itself reversible. The full source and step-by-step deployment instructions live in the aws-samples repository README. At a high level you deploy three AWS CloudFormation stacks, the cross-account AWS Identity and Access Management (IAM) roles, the VPC network, and the Cognito-authenticated AgentCore runtime that hosts the MCP server, then register that runtime as an action connector in Amazon Quick. By registering the runtime as an action connector, you can drive the migrator from Amazon Quick in natural language, and you can also build a Quick App: a point-and-click web experience layered on the same MCP tools. You don’t build that UI by hand. The repository includes a ready-to-use app-builder prompt that you paste into the Amazon Quick app builder, replacing the placeholder connector and action IDs with your own to generate the app. The app turns the workflow into a guided flow: choose a source and target account and the resources to promote, preview what will be created or updated, run the migration, and review a history of every past migration, each backed by the versioned S3 snapshots the server writes. The following screens show that experience. Figure 3: Additional migration options available on the landing page Figure 4: The confirmation response after you choose Confirm and migrate Figure 5: The MCP server response listing the resources that were created or updated Figure 6: The History tab showing an auditable record of past migrations Figure 7: Rolling back a resource to an earlier backup version Cross-account promotion is a baseline expectation for enterprise software, and until now it has been the missing piece for Amazon Quick. The Quick Resource Migrator turns a slow, manual, hard-to-audit task into a fast, repeatable, and governed one: a single tool call recreates agents, connectors, and knowledge bases in a target account and copies permissions faithfully, all idempotently, so you can run it on every release.
由 claude-code/sonnet 自動生成