AWS Logo
Menu
Chat with your AWS Bill

Chat with your AWS Bill

Get details about your AWS bill and recommendation on cost saving using Amazon Q and Cost optimisation best practices

Ebrahim (EB) Khiyami
Amazon Employee
Published May 6, 2025
In this blog post, I’ll walk you through a simple demo to chat with your AWS bill—break it down, analyze it, and get cost optimization recommendations based on the AWS Well-Architected best practices. This uses the latest MCP support recently added to the Amazon Q CLI.

What can you ask?

With this setup, you can ask Amazon Q natural language questions like:
  • What is my storage cost across all regions?
  • What is my total spend in the last month?
  • Based on my S3 usage, can you recommend ways to reduce costs?
  • …and much more.
Amazon Q will understand your question using one MCP server, then route it to another server that can fetch and calculate the data. In some cases, it may even generate and run scripts on your behalf to get the answer. For example, if you ask for the total cost of EBS storage across all regions, it may need to gather and compute data that’s not directly available from the Cost Explorer API.

The architecture is a standard MCP server architecture

AmazonQ+MCP Cost Analysis

The setup is simple

Here’s how to do it on macOS:

🧱 Step 1: Set up Amazon Q CLI

  1. Install the Amazon Q CLI
  2. Run q login
  3. Run q chat

⚙️ Step 2: Configure MCP servers

To enable cost optimization queries, you need to link Amazon Q with the correct MCP servers. Do this by editing (or creating) the following file:
~/.aws/amazonq/mcp.json
Paste the following configuration:
restart your session and start asking questions about your AWS spend. Check the video above for examples.

🔗 Helpful Resources

Any opinions in this post are those of the individual author and may not reflect the opinions of AWS.

Comments