AWS ML ★ 92 4 min

Building an agentic app deployer with Amazon Bedrock and AWS Lambda

Advanced (300)Amazon BedrockAmazon Nova

🔗 https://aws.amazon.com/blogs/machine-learning/building-an-agentic-app-deployer-with-amazon-bedrock-and-aws-lambda/

📌 【AWS 技術解析】用 Agentic Pattern 解決企業內部工具開發的長尾問題

TL;DR:透過「規劃代理」與「配置代理」分離的架構,讓非技術員工能透過自然語言部署 Web App。

🤔 企業內部的「小工具」開發困境

在許多企業中,存在大量需求卻無法落實的內部工具。例如:運費計算器、簡單的表單或針對試算表的儀表板。這些工具規模太小,不足以排入開發者的 Backlog,但數量卻多到無法忽視。傳統的部署流程(包含 Repository、CI/CD、身份驗證、DNS 與維護)對非技術團隊來說門檻太高,導致這些需求被無限期擱置。

PDI Technologies 為了打破這個僵局,開發了 PDI Brew。這是一個讓員工只需用英文描述需求,幾秒鐘內就能獲得一個完整配置、具備 SSO 登入功能且運行在 AWS 上的多租戶 Web 應用程式的系統。

🧩 雙代理架構:分離「意圖」與「執行」

PDI Brew 採用了一種「Agentic Provisioning Pattern」(代理配置模式),將系統拆解為兩個具有不同信任層級(Trust Profiles)的代理:

  1. 規劃代理 (Planning Agent) —— 負責捕捉意圖

    • 職責:與使用者對話、協助細化需求、生成前端介面,並最終輸出一個結構化的 部署清單 (Deploy Manifest)(包含應用名稱、類型、資料 Schema 與存取控制設定的 JSON 格式)。
    • 兩種路徑
      • Path A (Vibe Skill):作為技能整合在現有的 AI 助手(如 Claude、ChatGPT)中,提供豐富的對話體驗。
      • Path B (Amazon Bedrock):在 AWS 信任邊界內透過 Bedrock 進行模型調用,確保數據不流出 AWS 邊界,適合對數據駐留有嚴格要求的團隊。
  2. 配置代理 (Provisioning Agent) —— 負責確定性執行

    • 實作:運行於 AWS Lambda 上。
    • 職責:接收 JSON 部署清單,進行工作負載分類,並將 AWS SDK for JavaScript v3 與 Microsoft Graph API 作為工具進行編排。
    • 特性:為了避免 AI 幻覺(Hallucination),配置過程是決定性(Deterministic)且可審核的。

📊 非同步編排與資源配置流程

當部署清單傳遞至 Lambda 後,配置代理會根據需求選擇路徑:

  • 靜態應用:僅配置 S3、CloudFront 與 DynamoDB 註冊表。
  • 全端應用:除了上述資源,還會驅動 DynamoDB、API Gateway,以及針對需要 AI 能力的應用配置 Lambda 與 IAM。
  • 身份管理:透過 Microsoft Graph API 建立並管理 M365 群組。

針對耗時較長的步驟(例如 M365 群組的目錄同步),Lambda 會使用 非同步自我調用 (Asynchronous Self-invocation),即透過 lambda:InvokeFunctionEvent 類型模式在背景執行,並立即回傳應用程式 URL 給使用者,避免同步請求超時。

💡 解耦後的架構優勢

  • 安全性與治理:每個應用程式都繼承相同的平臺標準,並能選擇性地啟用受控的 AI 能力(如對話、摘要、分類),且開發者無需直接接觸模型端點或 API Key。
  • 靈活性:透過 PLANNER_MODE 環境變數,企業可以針對不同組織或工作區,自由切換使用「AI 助手模式」或「Bedrock 模式」。
  • 擴展性:規劃層與配置層分離,未來若要將 Bedrock 調用替換為更強大的託管代理運行時(Managed Agent Runtime),完全不會影響現有的部署流程。

🎯 實務啟示

對於需要快速迭代內部工具的工程團隊,這種「規劃與執行分離」的模式提供了極高的安全性與穩定性。透過將「不確定性」的語言理解留在規劃層,而將「確定性」的資源配置交給 Lambda 執行,可以有效降低 AI 引入的風險,同時大幅提升非技術人員的開發效率。

🔗 來源

#AWS #AmazonBedrock #AWSLambda #GenerativeAI #AgenticWorkflow #CloudComputing #Serverless #SoftwareEngineering #DevOps #PDI_Technologies

原始資料 AWS ML · 收集於 2026-08-07
來源原標題
Building an agentic app deployer with Amazon Bedrock and AWS Lambda
作者
Ramesh Kadali
原始標籤
Advanced (300) · Amazon Bedrock · Amazon Nova
原始連結
https://aws.amazon.com/blogs/machine-learning/building-an-agentic-app-deployer-with-amazon-bedrock-and-aws-lambda/

摘要原文

Many enterprises have a long tail of internal tools that never get built. A team needs a shipping-cost calculator, a straightforward intake form, a small dashboard over a spreadsheet, but each one requires a developer, a backlog slot, and a deployment pipeline. The tools are too small to prioritize and too numerous to ignore. PDI Technologies serves the convenience retail and petroleum wholesale industries, helping businesses around the globe increase efficiency and profitability by securely connecting their data and operations. PDI has 40 years of experience, a workforce of approximately 4,000 employees, and serves over 200,000 customer locations across more than 200 countries and territories. PDI recognized that traditional deployment pipelines were blocking non-technical teams from shipping the tools they needed. To close that gap, PDI Technologies built PDI Brew. A non-technical employee describes the tool they want in plain English, and within seconds they receive a fully provisioned, multi-tenant web application, protected by single sign-on (SSO) and running on AWS. No Git, no terminals, and no DevOps knowledge required. The person who needs the tool is the person who ships it. Because every app inherits the same platform, each one can opt into a governed AI capability (chat, summarize, classify) backed by Amazon Bedrock . This occurs without its author ever touching a model endpoint or an API key. In this post, we show how PDI Technologies built PDI Brew around an agentic provisioning pattern . A planning agent captures user intent as a structured manifest using a skill inside an AI assistant (for example, Claude, ChatGPT, or Claude Code) or as an Amazon Bedrock model invocation inside an AWS trust boundary. A provisioning agent running on AWS Lambda then decomposes that manifest, classifying the workload, selecting tools, and orchestrating the creation of every downstream AWS resource in one request. We then show how the same platform exposes in-app AI as a governed, least-privilege gateway to Amazon Bedrock. We describe the architecture, the security model, long-running provisioning steps inside Lambda, the AI guardrail-and-budget design, and the cost profile of running this system at scale. To understand this architecture, familiarity with the following AWS services is helpful: AWS Lambda, Amazon API Gateway, Amazon DynamoDB, Amazon Simple Storage Service (Amazon S3), Amazon CloudFront, and Amazon Bedrock. Experience with Microsoft Entra ID (formerly Azure AD) and MSAL.js is useful for the authentication sections. Verify you have the AWS Command Line Interface (AWS CLI) installed and configured with credentials that have sufficient permissions to create AWS Identity and Access Management (IAM) roles and policies if you plan to implement a similar pattern in your own environment. Traditional internal-tool delivery couples a straightforward business need to a full software delivery lifecycle. Even a single-page calculator inherits the cost of a repository, a build pipeline, an authentication integration, a hosting decision, a TLS certificate, DNS, logging, and ongoing maintenance. The result is a permanent queue of small tools that are always deprioritized behind revenue-generating features. We wanted a system with four properties: “Agentic” does not need to mean “a large language model in the request path for every decision.” We define an agent as a system that takes a goal, decomposes it, selects tools, and acts toward that goal. PDI Brew separates the two halves of that definition into two agents with very different trust profiles. The planning agent captures intent. It interviews the user, helps them refine what they want, generates the application front end, and critically emits a structured deploy manifest: a JSON description of the user’s intent (app name, type, data schema, and access-control settings). The planning logic is packaged as the Vibe App Builder skill, which runs inside whatever AI assistant the employee already uses. Running the planner in the assistant gives users a rich conversational experience in a tool they already have open and keeps the surface area on the AWS side small. The provisioning agent is an AWS Lambda function. It receives the manifest and acts as a deterministic, auditable, tool-using orchestrator. It validates the request, classifies the workload, and chooses a provisioning path. It then calls AWS and Microsoft Graph APIs as tools, handles long-running steps through asynchronous self-invocation, and returns a live URL. Putting the provisioning logic in Lambda rather than in a chat session is deliberate: provisioning is exactly the kind of workload where every decision must be logged, reproducible, and free of hallucination. Intent can come from anywhere, so the planner is designed as a pluggable layer with two interchangeable paths. A single environment variable ( PLANNER_MODE ) selects which one is active, and both paths emit the identical deploy manifest, so everything downstream is unchanged. Path A — the Vibe Skill in any AI assistant. The Vibe App Builder skill (hereafter, the Vibe Skill) packages the planning logic and runs inside whatever AI assistant the employee already uses. The assistant interviews the user, generates the front end, and produces the manifest. The planner runs outside AWS, which gives users a rich conversational experience in a tool they already have open. Path B — Amazon Bedrock inside the AWS trust boundary. For channels like Teams, a web form, or an IDE, the request is sent to Amazon Bedrock. A Bedrock model invocation ( InvokeModel ) acts as the planner: it classifies the workload, emits the same manifest, and can validate or repair the data schema before provisioning. This path operates entirely inside AWS, so every decision is captured in AWS CloudTrail and tied to a model-invocation ID, and no intent data leaves the AWS boundary. This is important for teams with strict data-residency requirements. One contract, one provisioning agent. Because both planners emit the same manifest JSON, the provisioning agent on Lambda and the entire per-app runtime are identical regardless of path. Adding the Bedrock path was an additive change, not a rewrite. And PLANNER_MODE can be pinned per organization, workspace, or user, so one enterprise can require the Bedrock path while another keeps the in-assistant experience. It also leaves a clean forward path: the Bedrock invocation can later be replaced with a richer managed agent runtime without touching Path A or the provisioning agent. The following diagram illustrates the end-to-end architecture. It has three layers: a pluggable intent and planning layer, a unified agentic provisioning runtime, and a per-app runtime, supported by shared edge, identity, and observability services. The following walkthrough traces a request through each layer: The provisioning agent performs two core functions: classifying workloads and orchestrating long-running provisioning steps. The Deploy Lambda treats the AWS SDK for JavaScript v3 and the Microsoft Graph API as its tool belt. Based on the manifest, it decides which tools to call and in what order. A static app touches only S3, CloudFront, and the DynamoDB registry. A full-stack app additionally drives DynamoDB and API Gateway, and, for capability-bearing apps, Lambda and IAM. Access control reaches into Microsoft Graph to create and manage the app’s M365 group. The classification is deterministic and fully logged: the same manifest always produces the same plan. Some provisioning steps take longer than a user wants to wait on a synchronous request, notably directory propagation after creating an M365 group. Rather than hold the request open, the agent uses asynchronous self-invocation: it calls lambda:InvokeFunction on itself with an Event invocation type, returns the live URL immediately, and lets the background copy finish the slow work.

tencent/hy3:free 自動生成