The Trade Desk hunts cloud cost anomalies with an AI agent
The Trade Desk replaced periodic manual cloud cost audits with an AI agent that maps its AWS spend to the workloads behind it and flags unit-cost anomalies for people to review.
The Trade DeskUnited StatesInternet platforms and advertisingIn production
- Scale
- The whole AWS estate
- Scenario
- Cloud cost anomaly investigation with AI agents
- Business function
- IT operations
- Kind of solution
- Root-cause analytics
- Who built it
- Built in-house (Amazon Web Services)
- Where it runs
- Public cloud
- Human oversight
- People approve each output
- Organization
- Enterprise
- AI types
- Generative AI, Agentic AI
tl;drThe agent's findings led to shipped fixes for S3 storage, NAT gateway routing and EBS snapshots.See the results
The Trade Desk runs an AI agent that investigates what its Amazon Web Services (AWS) infrastructure costs per bid and per impression. The agent replaced periodic manual cost audits1.
The Trade Desk is a demand-side platform (DSP), the technology that advertisers and agencies use to buy media programmatically1. Its investigation loop pairs an internal Cloud Cost MCP server with the AWS DevOps Agent. A workload-to-cost mapping agent ties each line of spend to the workload behind it and flags cost that rises without volume1.
In November 2026, the loop’s working list held six findings across the AWS estate. Fixes for NAT gateway routing and orphaned Amazon EBS snapshots had shipped, and S3 bucket cleanup had realized ongoing savings1.
Before the deployment
The Trade Desk runs its bidding engine on AWS at enormous scale1. When a supply partner sends a bid request, the platform decides in milliseconds whether to bid, how much, and for which advertiser1.
For a long time, cost work meant periodic manual audits1:
- Manual audits: An engineer picked a service, pulled a cost report, and looked for anomalies1.
- Gaps between audits: The approach didn’t scale, and unit-cost regressions sat undiscovered between audits1.
- Misleading totals: Absolute infrastructure spend always rises with volume, so the total bill said little about efficiency1.
- A fixed constraint: Nothing on the hot path that answers each auction can add latency or change bidding behavior, so the bidding fleet can’t shrink1.
What was built
The solution is a continuous investigation loop that maps AWS spend to the workloads behind it and proposes cost fixes that a person approves1. It measures unit cost in two ways: infrastructure cost per thousand impressions served, and cost per million bid requests processed, which counts the bids the platform loses1. The loop works as a continuous AWS Well-Architected Framework review of the Cost Optimization pillar, run by software instead of on a calendar1.
- Cloud Cost MCP server: Exposes the billing data as tools that an agent calls directly, such as cost by service, cost by resource, and month-over-month usage trends1.
- Workload-to-cost mapping agent: Maps each line of spend to the workload that generated it and correlates the cost pattern with workload change. It flags where the two diverge1.
- AWS DevOps Agent: Supplies operational context. It reads the signals, forms hypotheses, and validates changes against how the workload behaves1.
- People: A person validates the findings and approves each lever after the agent has checked it against production behavior1.
The agent checks three kinds of levers against production behavior before anything changes1:
- Compute generation: Newer instance generations, and AWS Graviton where the workload allows, checked against the workload’s CPU and memory profile1.
- Storage tiers: Objects move out of full-price tiers into the tier that matches access patterns, checked against retrieval behavior1.
- Data transfer: High-volume traffic moves from costlier paths, such as a NAT gateway, to VPC endpoints, checked against where the bytes flow1.
Technology and architecture
The AWS DevOps Agent is an AI-powered agent for production operations that correlates telemetry, code, and deployment data2. It runs on large language models hosted on Amazon Bedrock, and it can connect to private MCP servers such as the one The Trade Desk built2, 3.
| Layer | What they used | Role | Source |
|---|---|---|---|
| Task agent | AWS DevOps Agent | Supplies operational context, forms hypotheses, and validates changes against workload behavior | 1, 2, 3 |
| Task agent | Workload-to-cost mapping agent | Maps each line of spend to its workload and flags where cost and workload change diverge | 1 |
| Tools and actions | Cloud Cost MCP server | Exposes the billing data as tools that the agent calls directly | 1, 2 |
| Data set | AWS Cost and Usage Report (CUR) | Provides the month-over-month billing data that the agents analyze | 1 |
Data inputs
- Billing data: Month-over-month AWS Cost and Usage Report (CUR) data, queried by service, by resource, and as usage trends1.
- Workload-change signals: Impression volume, bid-request throughput, and deployment events, which the agent correlates with the cost pattern1.
- Production behavior: Each workload’s CPU and memory profile, storage retrieval behavior, and network byte flows, used to validate a lever1.
How one finding flows through the system
- Every summary signal for Amazon Simple Storage Service (Amazon S3) looked healthy. Spend grew in line with volume, and a lifecycle rule was in place1.
- The mapping agent tied S3 spend to its workloads and found that the lifecycle rule swept only new writes1.
- Beneath it sat a large multi-year backlog in full-price S3 Standard across multiple buckets, which inflated the cost per stored object1.
- The agent surfaced the backlog for validation. Storage-tier moves are checked against retrieval behavior before a person approves them1.
Results
By November 2026, pointing the loop at the AWS estate had produced a working list of six findings, each framed by its effect on unit cost1:
- Amazon S3 storage tiering: Zero-risk tier moves are rolling out, and related bucket cleanup has realized ongoing savings1.
- AWS Config: Recording cost roughly doubled in two months, because Kubernetes pod and network-interface churn generated tens of millions of configuration items per day. The fix moves to scheduled recording and narrows the tracked resource types1.
- NAT gateway data transfer: High-volume traffic to AWS services ran through a NAT gateway instead of VPC endpoints. The routing change shipped, and its full effect confirms in the next billing cycle1.
- Amazon EBS snapshots: Stale, orphaned snapshots accrued cost with no owning workload. The cleanup shipped, and the detection pattern now catches them automatically1.
- Compute generation: A move from x86 instances to newer generations, and to AWS Graviton where the workload allows, is being evaluated1.
- Elastic Load Balancing: A load-balancer architecture change to lower per-request cost is being sized1.
Lessons learned
A continuous loop suits an estate where fixes interact. Moving S3 data to another tier changes egress patterns, and changing NAT gateway routing changes what AWS Config records, so a point-in-time audit under-serves an estate this large1.
Mapping cost to workloads found what totals hid. The S3 backlog sat under summary signals that all looked healthy, and the agent found it by tying spend to the workloads that produced it1.
The findings are at different stages. The S3 cleanup, the NAT gateway change and the EBS cleanup had shipped, while the compute migration was still being evaluated and no move had been made1.
People stay in every decision. AWS DevOps Agent gives no confidence score for its outputs, so the customer’s workflow must judge each finding by human review, and at The Trade Desk a human validates the findings before action1, 3.
The findings come from a post on the AWS for Industries blog that two The Trade Desk employees wrote with two AWS staff1.
Case study scorecard
Sources by publication date
- Vendors and partners 3
Build this solution yourself
Analysis
What you need
- Billing data mapped to workloads: The agent works from month-over-month CUR data and needs the workload behind each line of spend to tell a regression from growth1.
- Volume measures beside the bill: The correlation uses impression volume, bid-request throughput, and deployment events, so you need the measures that your own unit cost divides by1.
- A defined no-go zone: The Trade Desk ruled out any change that adds latency or changes bidding behavior, which pointed the agent at asynchronous systems, storage, and networking1.
Reference architecture
Root-cause analytics
A root-cause analytics solution analyzes a production line's inspection, test, and machine data for the patterns behind its defects and lost output, and gives the findings to the people who trace each cause. Models read the data of every unit and machine, tag the known failure patterns, and report new ones and early signs of failure. Agents rank what is found and deliver it to each role in the tools that people already use, and engineers work out the cause of each pattern and decide what enters the catalog of known patterns, which the models are trained on.
- Production data store
- Known-pattern detection models
- Anomaly detection models
- Central compute
- Analysis tools
- Analysis agents (documented in this case study)
- Alerts and reports
- Route to the line's owners
A check mark shows a building block that this case study's sources document.
Open the reference architectureOthers who built it
- Rockwell Automation: Rockwell's AI agents cut defects 35% at its Singapore plant. Defects per unit fell 35% and rework costs 27% at Rockwell's Singapore electronics plant.
- Nestlé UK & Ireland: Nestlé maps factory food waste with AI and redistributes it. One Nestlé line found 4.8 tonnes of unreported edible surplus, and 201.82 tonnes went to people.
- Mercedes-Benz: AI agents speed electrical fault repair at Mercedes-Benz. Technicians diagnosed and repaired electrical faults 20-30% faster in Atlas's initial test phase.
- The AA: The AA tests AI fault diagnosis to send the right patrol. The AA is testing AI breakdown diagnosis and has trialed its digital job for about six months.
- BT Group: BT Group finds IT faults in real time with Dynatrace AIOps. BT spots application faults in real time instead of 30 minutes after the fact.
- ASML: ASML diagnoses lithography errors faster with Mistral AI. In early pilots, AI found certain ASML sub-system errors more than 70% faster.
Cite this case study
Enterprise AI Case Studies. "The Trade Desk hunts cloud cost anomalies with an AI agent." Updated Nov 25, 2026. https://case-studies.ai/case-studies/process-automation/PA-087-cloud-cost-investigation-agent-trade-desk/
@misc{csai-pa-087,
author = {{Enterprise AI Case Studies}},
title = {{The Trade Desk hunts cloud cost anomalies with an AI agent}},
year = {2026},
note = {Updated 2026-11-25},
url = {https://case-studies.ai/case-studies/process-automation/PA-087-cloud-cost-investigation-agent-trade-desk/}
}Sources
The following reporting, and every passage quoted from it, belongs to its publisher, not to this site. Sources and ownership
- Source 1:
The Trade Desk's Cloud Journey: AI-Assisted Optimization to AI Agents
Supporting excerpts (36)
The Trade Desk runs that decision engine on Amazon Web Services (AWS) at enormous scale.
We also show how they moved from periodic manual cost audits to a continuous, agent-driven investigation loop that maps spend to business workloads.
The Trade Desk is a DSP, the technology that advertisers and their agencies use to buy media programmatically across the open internet, including display, connected TV (CTV), audio, and digital out-of-home.
A supply partner sends a bid request, and in the milliseconds before the content loads, the platform decides whether to bid, how much, and for which advertiser.
At this scale, absolute infrastructure spend always rises with volume, so the total bill tells you little. A bigger bill can simply mean a bigger business.
Cost per thousand impressions served. This is an infrastructure cost-to-serve figure, distinct from the media CPM (cost per mille) that advertisers pay.
Cost per million bid requests processed (cost-per-bid). This is the infrastructure-native unit for a DSP, because the platform is billed for the compute and data movement of every bid it evaluates, including the ones it loses.
it can tell a genuine regression, such as cost per thousand impressions rising while volume stays flat, from cost that simply tracks a growing business.
Nothing on the hot path can add latency or change bidding behavior, no matter the savings, so you can’t shrink the fleet that answers every auction in milliseconds.
Instead, the work concentrates on the asynchronous systems, storage layers, and networking paths around it, which drive real cost per bid and per impression at scale.
For a long time, cost work meant periodic manual audits. An engineer picks a service, pulls a cost report, and looks for anomalies. That doesn’t scale, and unit-cost regressions sit undiscovered between audits.
So the approach changed, built from an internal Cloud Cost MCP server and the AWS DevOps Agent.
The Cloud Cost MCP server exposes The Trade Desk’s AWS Cost and Usage Report (CUR) data as tools an agent can call directly, such as cost by service, cost by resource, and month-over-month usage trends.
The AWS DevOps Agent supplies operational context. It reads those signals, forms hypotheses, and validates changes against how the workload behaves, which turns cost investigation from a slow manual pull into something continuous.
The heart of it is a workload-to-cost mapping agent. It ingests month-over-month CUR data, maps each line of spend to the workload that generated it, and correlates the cost pattern against the workload-change pattern (impression volume, bid-request throughput, and deployment events). It then flags where the two diverge.
Cost rising without a matching volume increase is a unit-cost anomaly, and that is what the agent surfaces for validation.
From there, the agent validates concrete optimization levers against real workload behavior before anything changes.
Compute-generation migration: Moving instances to a newer generation, and where the workload allows, evaluating a move from x86 to AWS Graviton for better price-performance. Each move is validated against the workload’s actual CPU and memory profile.
Storage-tier moves: Shifting objects out of full-price tiers into the tier that matches real access patterns, validated against retrieval behavior.
Data-transfer pattern changes: Rerouting high-volume traffic off costlier paths, such as a NAT gateway, onto cheaper ones such as VPC endpoints, validated against where the bytes actually flow.
Map every line of CUR spend to its workload, correlate cost against workload change, and then validate the lever against production behavior before a human approves it. Mapping without correlation just relabels the bill, and correlation without validation produces changes that look good on a chart and hurt in production.
The findings that mattered most were the ones a summary view is blind to. Amazon Simple Storage Service (Amazon S3) is the clearest example. Every summary signal looked healthy, with spend growing in line with volume and a lifecycle rule in place.
In effect, this loop is a continuous AWS Well-Architected Framework review scoped to the Cost Optimization pillar, run by software instead of on a calendar. As with any Well-Architected review, a human validates the findings before action.
Pointing the loop at the AWS estate produced a working list of concrete findings, each framed by its effect on unit cost:
Beneath a lifecycle rule that swept only new writes, the agent found a large multi-year backlog in full-price S3 Standard across multiple buckets, inflating cost per stored object. Zero-risk tier moves are rolling out, and related bucket cleanup has already realized ongoing savings.
AWS Config: Recording cost roughly doubled in two months. The cause was Kubernetes pod and network-interface churn generating tens of millions of configuration items per day. The fix moves from continuous to scheduled recording and narrows tracked resource types.
NAT gateway data transfer: High-volume traffic to AWS services was routed through a NAT gateway instead of VPC endpoints. The routing change shipped, and the full effect confirms in the next billing cycle.
Stale, orphaned snapshots accrued cost with no owning workload. Cleanup shipped, and the detection pattern now catches these automatically.
A migration is being evaluated against the workload’s CPU and memory profile, and no move has been made yet.
Elastic Load Balancing: A load-balancer architecture change to lower per-request cost is being sized.
Moving Amazon S3 data into the right tier changes egress patterns, modifying NAT gateway routing changes what AWS Config records, and a compute-generation migration changes both cost and performance. Interconnected workloads are exactly why a point-in-time audit under-serves an estate this large.
Optimize for unit cost, not the absolute bill. Track cost per million bid requests and per thousand impressions served, because a growing bill can just mean a growing business.
Shreyas Shah is a Staff Product Manager at The Trade Desk.
Gaurav Kumar is a Senior Software Engineer at The Trade Desk.
Sharik Pahwa is a Principal Solutions Architect at AWS
Jitesh Kumar is a Senior Customer Solutions Manager with Amazon Web Services.
- Source 2:
Supporting excerpts (3)
AWS DevOps Agent is an AI-powered, always-available agent that spans Code Change Risk Analysis and production operations
Correlating telemetry, code, and deployment data to understand relationships between your application resources.
Connect to private or remote MCP servers to extend further into proprietary systems.
- Source 3:
AWS DevOps Agent - AWS AI Service Cards
Supporting excerpts (3)
AWS DevOps Agent uses large language models (LLMs) hosted on Amazon Bedrock (Amazon Bedrock) to
AWS DevOps Agent does not provide a confidence score for its outputs;
a customer's workflow must decide if an investigation finding or recommendation is effective
Comments
Start the conversation.
Invited members of the library comment here. Sign in to join the conversation.