Saltar al contenido
ES EN

Integrate DuckDB into Amazon Aurora PostgreSQL with This Technical Guide

Learn how to query historical data from Amazon S3 within Aurora PostgreSQL by combining operational data with DuckDB, without reverse ETL pipelines.

Software engineering

AWS has acquired DuckLabs, the Amsterdam-based company behind DuckDB, the analytical database designed for very fast queries on moderate volumes. Its co-founders, Hannes Mühleisen and Mark Raasveldt, will continue to lead the team and the project's technical direction within AWS. Details can be found in DuckLabs' announcement.

What interests those of us who build systems most is the immediate practical consequence: Amazon Aurora PostgreSQL now incorporates a DuckDB-powered feature. This guide summarizes how to approach its use, what to expect, and what to look out for. Keep in mind that we are basing this on what AWS has published, so any configuration details not found there should be cross-referenced with the official documentation.

Conceptual diagram of an operational database connected to historical cloud storage
A single query crosses recent and historical data.

What You Need

The central idea is to avoid so-called reverse ETL, which are processes that duplicate data to keep operational and historical data synchronized. With the new feature, a single query can combine live Aurora data with Apache Iceberg tables managed with AWS Glue Data Catalog, as well as Parquet and Iceberg data stored in Amazon S3 and S3 Tables.

  • An Amazon Aurora PostgreSQL cluster in a commercial AWS region or AWS GovCloud (US), where the feature is available.
  • Historical data in Parquet or Iceberg format, either in S3 buckets, S3 Tables, or cataloged using AWS Glue Data Catalog.
  • Access permissions to that data from Aurora, which you must define according to your organization's policies.
  • A clear understanding of the cost: there is no additional charge for the feature, but you pay for incremental Aurora compute and S3 requests generated by your queries.
  1. Confirm that your Aurora PostgreSQL cluster is in a compatible region and review the version and configuration requirements in the AWS announcement.
  2. Organize your historical data in Parquet or Iceberg and register the tables in the AWS Glue Data Catalog if you are using Iceberg.
  3. Grant Aurora read access to the necessary buckets or tables, applying the principle of least privilege.
  4. Write a query that joins an operational Aurora table with the historical table and validate the result against a known sample.
  5. Monitor compute consumption and S3 requests for a few days before moving to production.

Executing Hybrid Queries

The processing of these queries stays within Amazon Aurora, with no additional network hops or intermediate ETL pipelines, which reduces configurations and resources. For platform maintainers, this means fewer components to monitor and fewer data copies that can become stale. As a reference, the following pattern illustrates the idea generically; the exact syntax should be taken from AWS documentation.

-- Illustrative schema, not official syntax
-- SELECT ... FROM operational_table
--   UNION ALL
-- SELECT ... FROM historical_table_in_s3;

There's context that helps understand the move. According to Mai-Lan Tomsen Bukovec, VP of technology at AWS, DuckDB was born to solve the performance of over 90% of the world's queries, which typically handle a terabyte of data or less in analytics and dashboards. She considers it especially relevant in agentic AI workloads, where agents launch small exploratory queries before deciding how to proceed.

The relationship between the two teams is not new. On Werner Vogels' blog, Andy Warfield recounts that contact began when the S3 team was working on S3 Tables and that, for about two years, both teams explored AWS Lambda to quickly launch DuckDB queries and smoothed integration with AWS engines using ATTACH and CONNECT commands. You can expand on the joint approach in the AWS blog.

Representation of a rubber duck next to a database, alluding to the DuckDB logo
DuckDB and its entire Duck Stack will remain open source.

What Remains the Same and What Remains to Be Seen

DuckDB and its "Duck Stack" components, such as DuckLake and Quack, will remain free under the MIT license, and the non-profit DuckDB Foundation will continue to oversee the projects. The community has welcomed the news, albeit with some skepticism: some hope that the acquisition will not slow down the project's pace of innovation.

Tip Design your queries with the bill in mind: you only pay for incremental Aurora compute and the S3 requests they generate. Filter by columns and partitions before joining and measure with a small volume first.

One final warning: this feature does not replace a dedicated analytical warehouse in all cases. If your historical queries are very heavy or very frequent, it's advisable to check the impact on the transactional workloads of the same cluster with real data. There are still unknowns, such as the pace at which new DuckDB-based features will arrive in other AWS services, which the published material does not detail.

Original source: infoq.com

Article generated with AI.larebelion

Kernel

· Head of Technology · Spain

«Fewer synchronization pipelines sounds great, but every simplification in the cloud comes with its own bill and dependency.»

Comentarios

Publicar un comentario