跳转到主要内容
Chinese, Simplified

category

人工智能代理正在彻底改变企业如何增强其运营能力和企业应用程序。通过实现自然语言交互,这些代理为客户提供了精简、个性化的体验。Amazon Bedrock Agents利用基础模型(FM)的功能,将其与API和数据相结合,以有效地处理用户请求、收集信息和执行特定任务。多智能体协作的引入现在使组织能够协调多个专门的人工智能代理协同工作,以应对需要不同专业知识的复杂、多步骤的挑战。

Amazon Bedrock提供多种功能模块,让您可以选择最适合您特定用例的功能模块。在这些产品中,Amazon Nova作为AWS的下一代FM脱颖而出,以卓越的价值提供突破性的智能和行业领先的性能。

Amazon Nova系列包括三种型号:

  • 了解型号-提供Micro、Lite和Pro版本
  • 内容生成模型——以画布和卷轴为特色
  • 语音转语音模型——Nova Sonic

这些模型专门针对企业和业务应用程序进行了优化,在以下功能方面表现出色:

  • 文本生成
  • 摘要
  • 复杂的推理任务
  • 内容创建

这使得Amazon Nova成为我们FinOps解决方案等复杂用例的理想选择。

Amazon Nova型号系列的一个关键优势是其行业领先的性价比。与其他企业级AI模型相比,Amazon Nova以更具竞争力的价格提供了相当或更优的功能。这种成本效益,加上其多功能性和性能,使Amazon Nova成为寻求实施先进人工智能解决方案的企业的一个有吸引力的选择。

在这篇文章中,我们使用Amazon Bedrock的多代理功能来演示一种强大而创新的AWS成本管理方法。通过使用Amazon Nova FM的高级功能,我们开发了一个解决方案,展示了人工智能驱动的代理如何彻底改变组织分析、优化和管理AWS成本的方式。

解决方案概述

我们创新的AWS成本管理解决方案利用人工智能和多代理协作的力量,提供全面的成本分析和优化建议。该系统的核心围绕三个关键组件构建:

  • FinOps监督代理——充当中央协调员,管理用户查询并协调专业下属代理的活动
  • 成本分析代理–使用AWS Cost Explorer收集和分析指定时间范围内的成本数据
  • 成本优化代理–使用AWS Trusted Advisor成本优化支柱提供可操作的成本节约建议

该解决方案将Amazon Bedrock的多代理协作功能与Amazon Nova集成在一起,创建了一个智能、交互式、成本管理的人工智能助手。这种集成实现了专业代理之间的无缝通信,每个代理都专注于AWS成本管理的不同方面。该解决方案的主要特征包括:

  • 通过具有基于角色的访问控制的Amazon Cognito进行用户身份验证
  • 托管在AWS Amplify上的前端应用程序
  • 实时成本洞察和历史分析
  • 可行的成本优化建议
  • 并行处理任务以提高效率

通过将人工智能驱动的分析与AWS成本管理工具相结合,该解决方案为财务团队和云管理员提供了一个强大、用户友好的界面,以深入了解AWS的支出模式并确定成本节约机会。

下图中显示的架构使用了几个AWS服务,包括AWS Lambda函数,来创建一个可扩展、安全和高效的系统。这种方法展示了人工智能驱动的多代理系统在协助云财务管理和解决各种云管理挑战方面的潜力。

In the following sections, we dive deeper into the architecture of our solution, explore the capabilities of each agent, and discuss the potential impact of this approach on AWS cost management strategies.

Prerequisites

You must have the following in place to complete the solution in this post:

Deploy solution resources using AWS CloudFormation

This CloudFormation template is designed to run in the us-east-1 Region. If you deploy in a different Region, you must configure cross-Region inference profiles to have proper functionality and update the CloudFormation template accordingly.

During the CloudFormation template deployment, you will need to specify three required parameters:

  • Stack name
  • FM selection
  • Valid user email address

AWS resource usage will incur costs. When deployment is complete, the following resources will be deployed:

  • Amazon Cognito resources:
  • AWS Identity and Access Management (IAM) resources:
    • IAM roles:
      • FinanceUserRestrictedRole
      • DefaultCognitoAuthenticatedRole
    • IAM policies:
      • Finance-BedrockAccess
      • Default-CognitoAccess
    • Lambda functions:
      • TrustedAdvisorListRecommendationResources
      • TrustedAdvisorListRecommendations
      • CostAnalysis
      • ClockandCalendar
      • CostForecast
    • Amazon Bedrock agents:
      • FinOpsSupervisorAgent
      • CostAnalysisAgent with action groups:
        • CostAnalysisActionGroup
        • ClockandCalendarActionGroup
        • CostForecastActionGroup
      • CostOptimizationAgent with action groups:
        • TrustedAdvisorListRecommendationResources
        • TrustedAdvisorListRecommendations

After you deploy the CloudFormation template, copy the following from the Outputs tab on the AWS CloudFormation console to use during the configuration of your application after it’s deployed in Amplify:

  • AWSRegion
  • BedrockAgentAliasId
  • BedrockAgentId
  • BedrockAgentName
  • IdentityPoolId
  • UserPoolClientId
  • UserPoolId

The following screenshot shows you what the Outputs tab will look like.

FinOps CloudFormation Output

Deploy the Amplify application

You need to manually deploy the Amplify application using the frontend code found on GitHub. Complete the following steps:

  1. Download the frontend code AWS-Amplify-Frontend.zip from GitHub.
  2. Use the .zip file to manually deploy the application in Amplify.
  3. Return to the Amplify page and use the domain it automatically generated to access the application.

Amazon Cognito for user authentication

The FinOps application uses Amazon Cognito user pools and identity pools to implement secure, role-based access control for finance team members. User pools handle authentication and group management, and identity pools provide temporary AWS credentials mapped to specific IAM roles. The system makes sure that only verified finance team members can access the application and interact with the Amazon Bedrock API, combining robust security with a seamless user experience.

Amazon Bedrock Agents with multi-agent capability

The Amazon Bedrock multi-agent architecture enables sophisticated FinOps problem-solving through a coordinated system of AI agents, led by a FinOpsSupervisorAgent. The FinOpsSupervisorAgent coordinates with two key subordinate agents: the CostAnalysisAgent, which handles detailed cost analysis queries, and the CostOptimizationAgent, which handles specific cost optimization recommendations. Each agent focuses on their specialized financial tasks while maintaining contextual awareness, with the FinOpsSupervisorAgent managing communication and synthesizing comprehensive responses from both agents. This coordinated approach enables parallel processing of financial queries and delivers more effective answers than a single agent could provide, while maintaining consistency and accuracy throughout the FinOps interaction.

Lambda functions for Amazon Bedrock action groups

As part of this solution, Lambda functions are deployed to support the action groups defined for each subordinate agent.

The CostAnalysisAgent uses three distinct Lambda backed action groups to deliver comprehensive cost management capabilities. The CostAnalysisActionGroup connects with Cost Explorer to extract and analyze detailed historical cost data, providing granular insights into cloud spending patterns and resource utilization. The ClockandCalendarActionGroup maintains temporal precision by providing current date and time functionality, essential for accurate period-based cost analysis and reporting. The CostForecastActionGroup uses the Cost Explorer forecasting function, which analyzes historical cost data and provides future cost projections. This information helps the agent support proactive budget planning and make informed recommendations. These action groups work together seamlessly, enabling the agent to provide historical cost analysis and future spend predictions while maintaining precise temporal context.

The CostOptimizationAgent incorporates two Trusted Advisor focused action groups to enhance its recommendation capabilities. The TrustedAdvisorListRecommendationResources action group interfaces with Trusted Advisor to retrieve a comprehensive list of resources that could benefit from optimization, providing a targeted scope for cost-saving efforts. Complementing this, the TrustedAdvisorListRecommendations action group fetches specific recommendations from Trusted Advisor, offering actionable insights on potential cost reductions, performance improvements, and best practices across various AWS services. Together, these action groups empower the agent to deliver data-driven, tailored optimization strategies by using the expertise embedded in Trusted Advisor.

Amplify for frontend

Amplify provides a streamlined solution for deploying and hosting web applications with built-in security and scalability features. The service reduces the complexity of managing infrastructure, allowing developers to concentrate on application development. In our solution, we use the manual deployment capabilities of Amplify to host our frontend application code.

Multi-agent and application walkthrough

To validate the solution before using the Amplify deployed frontend, we can conduct testing directly on the AWS Management Console. By navigating to the FinOpsSupervisorAgent, we can pose a question like “What is my cost for Feb 2025 and what are my current cost savings opportunity?” This query demonstrates the multi-agent orchestration in action. As shown in the following screenshot, the FinOpsSupervisorAgent coordinates with both the CostAnalysisAgent (to retrieve February 2025 cost data) and the CostOptimizationAgent (to identify current cost savings opportunities). This illustrates how the FinOpsSupervisorAgent effectively delegates tasks to specialized agents and synthesizes their responses into a comprehensive answer, showcasing the solution’s integrated approach to FinOps queries.

Amazon Bedrock Agents Console Demo

Navigate to the URL provided after you created the application in Amplify. Upon accessing the application URL, you will be prompted to provide information related to Amazon Cognito and Amazon Bedrock Agents. This information is required to securely authenticate users and allow the frontend to interact with the Amazon Bedrock agent. It enables the application to manage user sessions and make authorized API calls to AWS services on behalf of the user.

You can enter information with the values you collected from the CloudFormation stack outputs. You will be required to enter the following fields, as shown in the following screenshot:

  • User Pool ID
  • User Pool Client ID
  • Identity Pool ID
  • Region
  • Agent Name
  • Agent ID
  • Agent Alias ID
  • Region

AWS Amplify Configuration

You need to sign in with your user name and password. A temporary password was automatically generated during deployment and sent to the email address you provided when launching the CloudFormation template. At first sign-in attempt, you will be asked to reset your password, as shown in the following video.

Amplify Login

Now you can start asking the same question in the application, for example, “What is my cost for February 2025 and what are my current cost savings opportunity?” In a few seconds, the application will provide you detailed results showing services spend for the particular month and savings opportunity. The following video shows this chat.

FinOps Agent Front End Demo 1

You can further dive into the details you got by asking a follow-up question such as “Can you give me the details of the EC2 instances that are underutilized?” and it will return the details for each of the Amazon Elastic Compute Cloud (Amazon EC2) instances that it found underutilized.

Fin Ops Agent Front End Demo 2

The following are a few additional sample queries to demonstrate the capabilities of this tool:

  • What is my top services cost in June 2024?
  • In the past 6 months, how much did I spend on VPC cost?
  • What is my current savings opportunity?

清理

如果您决定停止使用FinOps应用程序,您可以按照以下步骤删除它、使用AWS CloudFormation部署的相关资源以及Amplify部署:

  • 删除CloudFormation堆栈:
    • 在AWS CloudFormation控制台上,在导航窗格中选择Stacks。
    • 找到您在部署过程中创建的堆栈(您为其分配了一个名称)。
    • 选择堆栈并选择删除。
  • 删除Amplify应用程序及其资源。有关说明,请参阅清理资源。

注意事项

为了在整个组织中实现最佳可见性,请在您的AWS付款人帐户中部署此解决方案,以便通过成本资源管理器访问链接帐户的成本详细信息。

Trusted Advisor成本优化可见性仅限于部署此解决方案的帐户。要扩大其范围,请在AWS组织级别启用Trusted Advisor,并相应地修改此解决方案。

在部署到生产环境之前,通过实施额外的安全措施来增强安全性。你可以通过将护栏与你在亚马逊基岩的代理联系起来来实现这一点。

结论

Amazon Bedrock的多代理功能与Amazon Nova的集成展示了人工智能在AWS成本管理中的变革潜力。我们的FinOps代理解决方案展示了专业人工智能代理如何在安全和用户友好的环境中协同工作,提供全面的成本分析、预测和优化建议。这一实施不仅解决了当前的成本管理挑战,而且适应了不断发展的云金融业务。随着人工智能技术的进步,这种方法为各种业务运营中更智能、更主动的云管理策略奠定了基础。

Additional resources

To learn more about Amazon Bedrock, refer to the following resources:

本文地址
最后修改
星期二, 九月 23, 2025 - 16:28
Tags
 
Article