Imagine running an e-commerce platform.
Your application stores customers, orders, payments, and inventory in PostgreSQL. Meanwhile, years of historical transactions and customer activity are stored in Amazon S3 as Apache Iceberg tables and Parquet files.
Your application team needs current customer information.
Your analytics team needs historical business insights.
Traditionally, connecting these two worlds requires ETL pipelines, data replication, and additional analytical infrastructure.
But what if your PostgreSQL database could query your data lakehouse directly?
That's exactly what makes direct querying of Apache Iceberg and Parquet data from Amazon Aurora PostgreSQL interesting.
AWS introduced this capability in September 2026, using DuckDB embedded inside Aurora PostgreSQL.
Let's explore how it works and how to use it.
1. Understanding the Architecture
The traditional architecture separates operational and analytical workloads.
Operational database:
- Customer information
- Orders and payments
- Inventory updates
- Application transactions
Data lakehouse:
- Historical transactions
- Customer activity
- Business analytics
- Historical reporting
With Aurora's direct querying capability, supported external data can be accessed without first copying the entire dataset into Aurora.
The architecture brings together:
- Amazon Aurora PostgreSQL for operational data
- Embedded DuckDB for analytical query processing
- Amazon S3 for external data storage
- Apache Iceberg and Apache Parquet for data formats
- AWS Glue Data Catalog and Amazon S3 Tables for supported catalog-based sources
The result is a SQL-based way to combine operational data with external lakehouse data.
2. How Does It Work?
The integration uses DuckDB embedded directly inside Aurora PostgreSQL.
At a high level:
- PostgreSQL receives and plans the SQL query.
- The embedded DuckDB engine processes supported analytical operations over external data.
- Aurora accesses the required files using configured IAM permissions.
- Query results can be combined with local PostgreSQL tables.
- Results are returned through the PostgreSQL interface.
The integration supports optimization techniques such as predicate pushdown and column pruning.
This helps avoid reading unnecessary data when queries access only selected columns or filtered records.
3. Enable Aurora Analytics
Before using the feature, check that your Aurora PostgreSQL engine version is supported.
The documented minimum versions include:
- Aurora PostgreSQL 17.11 and later
- Aurora PostgreSQL 18.6 and later
You also need:
- An appropriate IAM role attached to the cluster with the
AuroraAnalyticsfeature. - Required S3 and catalog permissions.
- Network connectivity to the external AWS services.
- The
aurora_analytics.enabledcluster parameter enabled.
After configuring the cluster, connect to the database and install the extension:
CREATE EXTENSION aurora_analytics;
This enables the Aurora Analytics extension in the database.
4. Create a Foreign Table for Parquet Data
Let's use an e-commerce example.
Suppose historical orders are stored in Amazon S3:
s3://company-data-lake/orders/
The files are stored in Parquet format.
You can create a foreign table that references this external dataset:
CREATE FOREIGN TABLE lake_orders ()
SERVER aurora_analytics_server
OPTIONS (
location 's3://company-data-lake/orders/',
format 'parquet'
);
Aurora can infer the schema from supported external data sources.
This foreign table provides SQL access to the external dataset without importing all its records into a native Aurora table.
For Apache Iceberg, you can reference supported catalog-based sources, including AWS Glue Data Catalog and Amazon S3 Tables.
5. Combine Operational and Analytical Data
Now comes the interesting part.
Suppose Aurora contains a customer table:
CREATE TABLE customers (
customer_id BIGINT PRIMARY KEY,
customer_name VARCHAR(100),
region VARCHAR(50)
);
Historical orders are stored externally in the lake_orders foreign table.
The business team wants to know how much revenue each customer has generated.
You can combine both datasets:
SELECT
c.customer_id,
c.customer_name,
c.region,
SUM(o.total_amount) AS total_revenue
FROM customers c
JOIN lake_orders o
ON c.customer_id = o.customer_id
GROUP BY
c.customer_id,
c.customer_name,
c.region
ORDER BY total_revenue DESC;
This query combines:
- Current customer information from Aurora.
- Historical order information from Amazon S3.
You can extend this approach to support:
- Customer lifetime value analysis
- Revenue by region
- Historical sales trends
- Product performance analysis
- Customer purchasing behavior
The key benefit is that both datasets can participate in the same SQL query.
6. What Makes DuckDB Important?
DuckDB is an analytical database engine designed for efficient analytical processing.
It supports column-oriented processing and works with analytical formats such as Parquet.
By embedding DuckDB inside Aurora PostgreSQL, AWS provides an analytical query engine alongside the familiar PostgreSQL interface.
This is useful because developers can access supported external datasets without necessarily introducing a separate query service for every analytical use case.
However, performance still depends on data layout, file sizes, query complexity, available compute, and concurrent workloads.
7. Do We Still Need to Copy Data?
Not necessarily.
One of the interesting aspects of this architecture is that external foreign tables are read-only references to supported datasets.
You can query the data in its existing location instead of copying the entire dataset into Aurora.
But sometimes you need frequently accessed results to be stored locally.
For example:
CREATE TABLE customer_revenue AS
SELECT
customer_id,
SUM(total_amount) AS total_revenue
FROM lake_orders
GROUP BY customer_id;
This creates a native Aurora table containing the query results.
You can use this approach when local access to frequently queried results makes sense for your application.
Remember: materialization creates a copy of the selected results. It is different from querying the external data directly.
8. Real-World Use Cases
E-Commerce Platforms
Combine current customer records with historical orders to analyze customer lifetime value and purchasing patterns.
Financial Applications
Query operational account information alongside historical transactions stored in an S3-based lakehouse.
SaaS Platforms
Combine current subscription details with historical application usage data to support customer reporting.
Customer Intelligence
Access customer profiles and historical behavioral information together for segmentation and business analysis.
These are potential use cases. Large-scale analytics may still be better suited to dedicated analytical platforms.
9. Important Considerations
Before using this architecture in production, keep a few things in mind.
IAM permissions
Aurora needs the appropriate permissions to access S3, Glue, S3 Tables, and KMS where applicable. Follow least-privilege access.
Network connectivity
Private Aurora environments need suitable network connectivity to the required AWS services. VPC endpoints can help.
Read-only external tables
Foreign tables are read-only. You cannot use them like normal PostgreSQL tables for INSERT, UPDATE, or DELETE operations.
Performance
Large analytical queries can consume significant resources. Benchmark your workload and consider a dedicated Aurora reader for analytical queries.
Supported data types and formats
Not every PostgreSQL data type or external data source is supported. Review the current AWS documentation before designing your schema.
10. Direct Querying vs. ETL and Zero-ETL
These approaches solve different problems.
Traditional ETL moves and transforms data into another destination.
Zero-ETL integrations help make operational data available in supported analytical destinations with reduced pipeline management.
Direct querying allows Aurora PostgreSQL to access supported external Parquet and Iceberg data.
You can use these approaches together depending on your architecture.
For example:
- Keep historical data in Amazon S3.
- Query selected external datasets directly from Aurora.
- Materialize frequently accessed results.
- Use ETL for transformations and downstream analytics.
The goal is not to eliminate every data pipeline. It is to choose the simplest architecture that meets your requirements.
Conclusion
For years, operational databases and analytical data lakes have been treated as separate worlds.
Now, Aurora PostgreSQL gives developers another option: query supported Apache Iceberg and Parquet data directly from the database using embedded DuckDB.
This doesn't mean every analytical workload belongs inside PostgreSQL.
But it does create new opportunities to combine operational information and historical data without building a separate data-copying workflow for every use case.
The future of data architecture isn't necessarily about moving all data into one place. It's about making the right data accessible when and where it's needed.
What do you think?
Would you use direct lakehouse querying from Aurora PostgreSQL in a production application, or would you keep operational and analytical workloads completely separate?
Share your thoughts in the comments!
Official AWS Resources
- Amazon Aurora PostgreSQL: Querying Apache Iceberg and Parquet Data
- How Aurora Analytics Works
- Getting Started with Aurora Analytics
- Aurora Analytics Prerequisites
- AWS Announcement

Top comments (0)