Exclusive Content:

Haiper steps out of stealth mode, secures $13.8 million seed funding for video-generative AI

Haiper Emerges from Stealth Mode with $13.8 Million Seed...

Running Your ML Notebook on Databricks: A Step-by-Step Guide

A Step-by-Step Guide to Hosting Machine Learning Notebooks in...

“Revealing Weak Infosec Practices that Open the Door for Cyber Criminals in Your Organization” • The Register

Warning: Stolen ChatGPT Credentials a Hot Commodity on the...

Create a FinOps Agent with Amazon Bedrock AgentCore

Building a FinOps Agent with Amazon Bedrock AgentCore for AWS Cost Management

Streamlining AWS Cost Management through Conversational AI

Solution Overview

Architecture Diagram

Using the Web Application

Prerequisites

Deploy the Solution using AWS CDK

Step 1: Clone the Repository

Step 2: Set Environment Variables

Step 3: Deploy Using CDK

Deploy the Amplify Application

Understanding the MCP Servers

Using the Web Application

Conversational Memory in Action

Clean Up

Conclusion

About the Authors

Managing AWS Costs with a FinOps Agent: A Comprehensive Guide

Managing costs across multiple AWS accounts can be a daunting task for finance teams. Often, they find themselves querying data from various sources to get a complete picture of spending and optimization opportunities. In this post, we will guide you through the process of building a FinOps agent using Amazon Bedrock AgentCore that will assist your finance team in managing AWS costs seamlessly. This conversational agent consolidates information from AWS Cost Explorer, AWS Budgets, and AWS Compute Optimizer into a single interface, allowing your team to ask questions such as, “What are my top cost drivers this month?” and receive immediate answers.

Solution Overview

The FinOps agent is composed of two main components:

  1. Authentication and Frontend Layer: Managed by AWS Amplify and Amazon Cognito, this layer provides user authentication and the web application interface.

  2. Amazon Bedrock AgentCore Runtime: This is where the heavy lifting happens. The runtime processes cost management queries, enjoys a 30-day conversation memory, and uses the Strands Agent SDK along with the Model Context Protocol (MCP).

With over 20 specialized tools at your disposal—from analysis to optimization—your finance team can now interact with AWS cost data through natural language queries, eliminating the need to navigate multiple AWS consoles.

Key Components of the Architecture

The architecture consists of five crucial sections:

Section A – Authentication Infrastructure

Using AWS Cognito for user authentication, this section deploys an authentication infrastructure (User Pool, Identity Pool, etc.). The Identity Pool provides temporary AWS credentials for secure communication between the frontend application and the AgentCore Runtime.

Section B – Image Build Infrastructure

This section deploys a container image build pipeline using services like Amazon S3, AWS CodeBuild, and Amazon ECR. CodeBuild clones necessary servers and builds ARM64 container images for use by the AgentCore Runtimes.

Section C – MCP Server Runtimes

Running transformed servers for billing and pricing, this section ensures secure JWT authorization through Cognito-enabled IAM permissions, allowing access to AWS APIs such as AWS Billing, Cost Management, and AWS Pricing.

Section D – AgentCore Gateway

The gateway acts as a unified endpoint for tool discovery and invocation, managing OAuth token exchange for outbound authentication.

Section E – Main Agent Runtime

The core agent utilizes the Strands Agent Framework and Claude Sonnet 4.5 for orchestrating model invocations and tool calls. It routes requests to the gateway and retrieves essential cost, billing, and pricing data.

Sample Workflow

When a user accesses the web application and asks, “What are my AWS costs for January 2026?” here’s what happens:

  1. The user authenticates through Amazon Cognito.
  2. Temporary AWS credentials are retrieved.
  3. The frontend forwards the user’s question to the AgentCore Runtime.
  4. The Strands agent analyzes the question and routes the request to gather cost data.
  5. The cost data is then analyzed and formatted before being sent back to the user as a natural language summary.

Deploying the Solution Using AWS CDK

Follow these steps to deploy the solution:

  1. Clone the repository:

    git clone https://github.com/aws-samples/sample-finops-agent-amazon-bedrock-agentcore
    cd sample-finops-agent-amazon-bedrock-agentcore
  2. Set environment variables:

    export ADMIN_EMAIL="your-email@example.com"
  3. Deploy using CDK:

    cd cdk && npm install && npm run build && npx cdk bootstrap && npx cdk deploy --all --require-approval never

    This process will take approximately 15-20 minutes and will deploy various CloudFormation stacks pivotal for your architecture.

Understanding the MCP Servers

The MCP servers specialize in cost management and pricing tools. The AWS Billing server focuses on historical spend analysis, while the AWS Pricing server provides real-time pricing data, enabling informed decision-making for new workloads.

Using the Web Application

After deployment, you can access the application using the provided URL. Log in using the credentials from Amazon Cognito and start making queries. You can ask questions like:

  • “Show me my costs by Region for the last 30 days.”
  • “What’s my cost forecast for the next 3 months?”
  • “What are my current cost savings opportunities?”

Conversational Memory

One standout feature is AgentCore Memory, which maintains context between user queries. For example, if you ask for your top 5 services by cost and then inquire about the details of the second service, the agent will remember and provide relevant information without requiring unnecessary repetition.

Clean Up

To avoid future charges, you can delete the resources created by this solution easily. Simply navigate to your project directory and execute:

npx cdk destroy --all

Conclusion

In this post, we explored how to build a FinOps agent using AgentCore, showcasing its ability to provide natural language access to cost analysis and optimization recommendations. With the power of AWS services, it can transform the way your finance team manages AWS costs.

Get started today and unlock the full potential of AWS cost management for your organization!

About the Authors

Salman Ahmed: Senior Technical Account Manager at AWS, specializing in guiding customers through AWS solutions.
Ravi Kumar: Senior Technical Account Manager focused on the travel and hospitality sector, interested in generative AI.
Sergio Barraza: Senior Technical Account Manager with over 25 years in software development, aiding in AWS adoption.

With their combined expertise, they aim to help organizations successfully navigate their cloud journey while enjoying personal interests that range from photography to music.

Latest

16-Year-Old Boy Posed ‘Chilling’ Question to ChatGPT Before His Death

Tragic Case of Luca Walker: AI's Chilling Role in...

Revamping Ecommerce Fulfillment: The Robotics Revolution

THG Fulfil Elevates Automation Strategy with Libiao Robotics' T-Sorter...

AI-Driven Legal Access Platform in India

Unveiling Nyaya Setu: India's Multilingual AI Chatbot for Accessible...

ASUS Unveils UGen300 USB AI Accelerator | ASUS Pressroom

Revolutionizing AI: Introducing the World’s First USB Edge AI...

Don't miss

Haiper steps out of stealth mode, secures $13.8 million seed funding for video-generative AI

Haiper Emerges from Stealth Mode with $13.8 Million Seed...

Running Your ML Notebook on Databricks: A Step-by-Step Guide

A Step-by-Step Guide to Hosting Machine Learning Notebooks in...

VOXI UK Launches First AI Chatbot to Support Customers

VOXI Launches AI Chatbot to Revolutionize Customer Services in...

Investing in digital infrastructure key to realizing generative AI’s potential for driving economic growth | articles

Challenges Hindering the Widescale Deployment of Generative AI: Legal,...

20+ Completed ML Projects to Enhance Your Resume

A Comprehensive Guide to Building Your Machine Learning Portfolio Unlocking Your Potential: From Theory to Practice Phase 1: Regression & Forecasting 1. Amazon Sales Forecasting 2. Electric Vehicle...

Integrating Amazon Bedrock AgentCore into Slack

Integrating Amazon Bedrock AgentCore with Slack: A Seamless AI Experience Overview of the Solution Architecture Diagram Prerequisites for Implementation Step 1: Creating a Slack App Step 2: Deploying the...

Unveiling Amazon Polly Bidirectional Streaming: Real-Time Speech Synthesis for Conversational AI...

Announcing Amazon Polly's New Bidirectional Streaming API: Revolutionizing Real-Time Text-to-Speech Experiences Elevating Conversational AI with Real-Time Synthesis Understanding the Limitations of Traditional Text-to-Speech Introducing Bidirectional Streaming: A...