Amazon Athena with DuckDB: A Practical Migration and Production Readiness Guide
Evaluate Athena powered by DuckDB with a workload-first plan: SQL compatibility, Lake Formation and catalog limitations, cost controls, Arrow results, benchmarks, and safe adoption alongside Athena engine 3.
By BoundLayer Engineering Team
BoundLayer is a senior engineering partner for SaaS, fintech, AI automation, cloud infrastructure, legacy modernization, Web3, IoT, GPU computing, and data systems.
On December 1, 2026, AWS introduced Amazon Athena powered by DuckDB in Preview. It brings DuckDB's SQL dialect and execution model to Athena's managed service, querying data in Amazon S3 and the AWS Glue Data Catalog without asking teams to run their own DuckDB servers. AWS describes the service as useful for interactive analytics, workloads with many exploratory queries, and a local-to-cloud development workflow.
This is a meaningful option for analytics teams, but it is not a drop-in replacement for every Athena engine version 3 workgroup. The feature is in Preview, SQL is not automatically translated between engines, and several important integrations and controls are not yet supported. A safe evaluation should start from actual queries, access policies, and operational constraints rather than a headline benchmark.
What changes in the query path
Athena powered by DuckDB uses the Glue Data Catalog to locate tables and reads data from S3. Athena provisions serverless workers and can distribute parts of a query across workers as query complexity and data volume increase. Results can be returned through familiar Athena clients and, where supported, streamed as Apache Arrow data to tools that understand Arrow.
The service supports a distinct DuckDB workgroup as well as running an individual query on DuckDB from an Athena engine version 3 workgroup. A DuckDB workgroup offers a stable place for DuckDB-specific SQL and settings. A per-query engine override can be useful for controlled testing without moving every query in a workgroup at once.
The local workflow is also different from simply running an embedded DuckDB database. The Athena DuckDB extension connects a local DuckDB session to an Athena workgroup. It can help engineers prototype against catalog data and then run selected queries in Athena when the data or concurrency exceeds a laptop's capacity. It does not mean arbitrary local database files, local extensions, or every DuckDB feature are available in the managed service.
Read AWS's overview of Athena powered by DuckDB and ways to access it before selecting an integration path.
Why a new engine is worth evaluating
DuckDB's columnar execution and SQL features can be valuable for interactive analytical queries. The December 1 AWS announcement claims up to twice the speed and up to 50% lower cost on large datasets compared with Athena engine version 3. Those are AWS-reported upper-bound results, not a workload guarantee. Partitioning, file sizes, data scanned, query shape, concurrency, and output size can change the result materially.
Other potential benefits include:
- More expressive SQL for analysis: DuckDB supports constructs such as
QUALIFY,PIVOT, andGROUP BY ALL. - Local prototyping with a path to larger data: use the Athena DuckDB extension to iterate locally, then submit queries to a managed workgroup.
- Columnar interoperability: Arrow results can flow into compatible data science and analytics tooling without an extra serialization conversion.
- Open table formats: Athena's DuckDB preview supports querying Parquet and Apache Iceberg v3 tables through Glue, while leaving the data in S3.
- Many-query use cases: query-heavy exploratory work, including agent-generated analysis, may benefit from a lower-latency analytical path when requests are well scoped and governed.
The last item needs special care. If an agent can generate queries, giving it an unrestricted path to large tables can create unpredictable spend and expose more data than the user should see. Treat engine selection as a performance option, not a security or cost-control mechanism.
The compatibility gap is the migration work
Athena engine version 3 and DuckDB are different SQL engines. Athena does not transparently translate a query when you change engines. A query that runs in one dialect may fail, return different results, or require a different expression in the other.
Inventory the SQL that matters before migrating:
- Find saved queries, dashboards, scheduled jobs, application queries, and generated SQL.
- Rank them by business criticality, frequency, scanned bytes, runtime, and downstream dependencies.
- Tag engine-specific syntax, UDFs, views, federated sources, and table formats.
- Select a small representative suite, including high-volume and edge-case queries.
- Compare results and operational behavior across engines before changing a default.
Pay attention to output semantics as well as whether a query executes: null handling, timestamps and time zones, decimal precision, casts, array and map behavior, ordering assumptions, and empty-result behavior can affect downstream reports. For financial or compliance reports, define tolerances and reconciliation checks with the data owner.
AWS documents a migration agent and per-query override path, but generated translations still need review and validation. Keep the current engine version available as a fallback while the DuckDB path is in Preview.
Preview limitations that can block adoption
AWS's current considerations and limitations include constraints that should be checked against your environment before running a proof of concept:
- Lake Formation tables are not supported during Preview. A table registered with Lake Formation fails for DuckDB workgroups, even if the principal has broad or fine-grained permissions.
- Federated catalogs and external data sources are unavailable. This includes cross-account catalog scenarios and sources such as DynamoDB, Snowflake, MySQL, DocumentDB, SQL Server, and PostgreSQL.
- Cross-Region S3 reads are not supported. Data locality and query-workgroup Region must match the supported deployment design.
- Several Athena features differ or are absent. Query result reuse, prepared statements, materialized views, some view operations, and various Iceberg maintenance procedures are not available in DuckDB workgroups.
- Table-format coverage is not identical. The current limitations include no Delta Lake, Hudi, or ORC support in DuckDB workgroups. Iceberg support also has restrictions around refs, changelog reads, and certain maintenance operations.
- Some workgroup configurations are incompatible. Current documentation lists restrictions involving IAM Identity Center, S3 Access Grants for results, client-side result encryption, execution roles, and other workgroup settings.
These are time-sensitive Preview limitations, not a permanent statement about the service. Re-check the documentation and feature stage before each production decision. If an essential table is protected or registered through Lake Formation, do not weaken its governance just to use DuckDB. Keep that workload on a supported engine until the integration supports the required authorization path.
Workgroups and query-level testing
Use a dedicated DuckDB workgroup for a production-like benchmark. Configure its result location, encryption, IAM access, and limits independently from existing Athena workgroups. A separate workgroup makes the chosen engine explicit and prevents a broad migration from silently changing saved queries.
For one-query experiments, Athena can override the engine from an engine version 3 workgroup. This is convenient for comparing representative SQL, but some workgroup settings prevent the override. The requested SQL must already use DuckDB syntax; Athena does not rewrite the query for you.
An important API detail: for DuckDB, StartQueryExecution can return success even when the SQL is invalid. Applications and automation must poll GetQueryExecution or use the batch status API and confirm the final query state before treating the result as successful. Do not use the initial submission response as a business-level success signal.
Cost and runaway-query controls
Benchmark the actual total cost, not just the per-query price or claimed improvement. A useful comparison includes:
- bytes scanned and data pruning;
- query duration and concurrency;
- data returned and result storage;
- client-side transfer and Arrow processing;
- retries, failed queries, and agent re-planning;
- the operational cost of maintaining separate engine workgroups and SQL variants.
The DuckDB Preview accepts BytesScannedCutoffPerQuery, but AWS documents that this cutoff is not enforced for DuckDB workgroups. Use DPU limits and CloudWatch alarms to constrain and monitor query activity. For user-facing applications and agent-generated SQL, add application-level query limits, approved datasets, timeouts, result-size bounds, and authorization checks. Avoid granting an analytics agent broad catalog access just because the engine is serverless.
Set alerts for query concurrency, DPU consumption, failures, and unexpected data scans. Use a budget or operational stop condition appropriate to the account; do not assume that familiar Athena workgroup controls behave identically in the new engine.
Choosing where results live
Athena can manage query results and clean them up after 24 hours, or write them to a customer-managed S3 bucket. Managed results reduce bucket setup and lifecycle work. A customer bucket provides control over retention and access, but those controls must be configured correctly.
Treat the result location as a separate data access boundary. A user with s3:GetObject permission on the results bucket may be able to read result files even if the application hides them or the user lacks a query API permission. Grant query submission and result retrieval separately, use a dedicated bucket or prefix, and set lifecycle and encryption policies that match the data classification.
For Arrow streaming, confirm the client library and API path are supported by the workgroup and result-storage mode. Test memory consumption and backpressure in the receiving application; streaming avoids waiting for a complete file but does not make a large result set inexpensive or safe to return.
A staged adoption plan
1. Check eligibility before benchmarking
Verify Region, table formats, Lake Formation use, catalog boundaries, encryption, IAM Identity Center, result handling, and workgroup settings. Disqualify unsupported paths early rather than spending time tuning a workload the preview cannot run.
2. Choose queries with a measurable baseline
Start with a representative workload: one large scan or join, one repeated interactive query, one query with complex SQL, and one downstream integration that consumes the result. Capture correctness, latency, bytes scanned, concurrency, and cost on Athena engine version 3.
3. Run both engines on controlled data
Use a dedicated workgroup or per-query override. Keep data snapshots and parameters identical. Compare result sets and query plans, and record engine, SQL text, workgroup, data snapshot, and client versions with every measurement.
4. Test failures and API behavior
Include invalid SQL, missing permissions, unavailable result destinations, timeout, empty results, and client disconnects. Verify orchestration code waits for terminal query status and does not re-run a costly query merely because a client lost the response.
5. Keep a reversible boundary
Route only selected query classes to DuckDB. Keep the engine version 3 path for unsupported data sources and maintenance operations. Do not switch every saved query or default workgroup until correctness, access control, and cost monitoring are understood.
When to wait
Stay with Athena engine version 3 for workloads that depend on Lake Formation-registered tables, federated data sources, unsupported file formats, query result reuse, or workgroup settings not available to DuckDB. If the workload is stable and already meets its latency and cost objectives, a preview migration may add operational work without a meaningful business benefit.
Consider DuckDB Preview for a bounded evaluation when the workload is S3- and Glue-centric, its tables and policies are eligible, and the team can compare results in a separate workgroup. Use the AWS lakehouse architecture guide for broader choices around Iceberg, catalogs, governance, and query engines.
Bottom line
Athena powered by DuckDB offers a new way to prototype and run analytical SQL on AWS-managed infrastructure, including a local development workflow and Arrow result support. The fastest route to value is not a blanket engine switch; it is a query-by-query evaluation with explicit compatibility, cost, and data-access checks.
BoundLayer helps teams build and modernize AWS data platforms, benchmark query engines, validate governance boundaries, and implement reliable ingestion and analytics pipelines. Treat Preview as an opportunity to gather evidence, and promote workloads only when the operational and business requirements are met.
This article reflects AWS Athena DuckDB Preview documentation available on December 2, 2026. Preview features and supported Regions can change. Verify current availability, limitations, and query behavior before implementation.
Related engineering articles
Data Lakehouse on AWS: Apache Iceberg, S3 Tables, Governance, and AI-Ready Analytics
A practical guide to AWS lakehouse architecture with Apache Iceberg and Amazon S3 Tables: ingestion, catalogs, governance, schema evolution, maintenance, query engines, cost, and migration.
Production AI Agents Need Fresh Data: Consistency, Isolation, and Safe Actions
Design AI agents that use operational data safely: set freshness contracts, isolate analytical reads, detect stale state, and guard writes with versions, idempotency, and revalidation.
Usage-Based Billing for SaaS: Metering Architecture, Reconciliation, and Customer Trust
Design reliable SaaS usage-based billing with durable event capture, idempotent metering, tenant attribution, reconciliation, customer-visible usage, and auditable corrections.
Evaluating a new analytics engine for AWS?
BoundLayer helps teams benchmark data platforms, validate access controls and SQL behavior, and plan production rollouts without disrupting existing analytics workloads.