AWS is integrating DuckDB into Athena, its serverless, distributed SQL query service, as part of a broader initiative to refit its analytics services for AI agents, which can be more demanding than humans.
"At AWS, we always listen to our customers and in this case the agent is an important customer that we're listening closely to," said AWS CEO Matt Garman during his re:Invent keynote.
In contrast to Trino and Presto, the basis of Athena engine version 3, Athena's DuckDB injection, now in preview, has resulted in a cost reduction of 50 percent on queries beyond 100 GB, according to AWS, thanks to DuckDB’s efficiency. And queries get processed 2x faster than Athena engine version 3.
AWS has been observing the way AI agents and LLMs use data, explained Mai-Lan Tomsen Bukovec, VP of technology, in an interview with The Register.
"We found that unlike humans who operate sequentially and linearly in a data pipeline, agents operate quite differently," she said.
"The LLM will take a complex question and will break it down into a series of smaller topics and then it'll process the smaller sub-questions in parallel, combine a response and return it. They are doing a very similar thing when they're writing a data quote."
So the human linear process, Tomsen Bukovec said, represents an eternity for an agent.
In thinking about how agents have become the new superusers of data and their consumption pattern where they're processing multiple queries in parallel, AWS went looking for a way to adapt the ergonomics and economics of agentic data patterns to something customers can adopt at scale, she said.
AWS found its answer in DuckLabs, which it then acquired.
"Duck started from a very simple premise, which is you can have your second computer when you know how to use your first one," said Tomsen Bukovec. "So they use basically every trick in the book to wring out every last resource from the underlying single compute node.
"It's vectorized execution. It's all kinds of tricks around larger-than-memory processing, a whole set of different database techniques either existing or invented to maximize the resources to process as much and as big of a query as you can on a single node."
This is a pretty revolutionary concept, she said. A lot of data processing today is done through Apache Spark, which dates back to 2010 when the compute nodes were much smaller. So you really need a cluster for handling large queries.
But between 2007 and 2026, she said, the power of a single compute node in the cloud has increased by 50x.
"So if you have a much more powerful single node and you have an engine that knows how to bring every last bit of resource out of that single node, you have an incredibly powerful building block for AI agents working with data," she said.
"Because if the AI agents are running many smaller queries in parallel, they're going to want to have the performance and the economics of executing those queries on a single node. That's what you get with Duck."
And for queries that span multiple nodes, AWS has DuckDB Scales, a plugin that extends queries across multiple servers. DuckDB Scales is being offered in preview in Athena and the plan is to release it as open source when Athena's DuckDB engine becomes generally available in 2027.
DuckDB is also headed to Amazon EMR (Elastic MapReduce) and Amazon Redshift, and the plan is to extend it to more services next year.
Tomsen Bukovec says the ability to handle so much data in a single query at low cost, and the ability to scale if necessary, represent a fundamental shift in analytics.
"It's one of the reasons why we're choosing [Duck] as the universal SQL engine for all of our AWS analytics services," she said. "It is a big bet." ®