View a markdown version of this page

Use Amazon Athena Federated Query - Amazon Athena

Use Amazon Athena Federated Query

If you have data in sources other than Amazon S3, you can use Athena Federated Query to query the data in place or build pipelines that extract data from multiple data sources and store the data in Amazon S3. With Athena Federated Query, you can run SQL queries across data stored in relational, non-relational, object, and custom data sources. For a full list of supported data sources, see Available data source connectors.

When you run a query against a data source, Athena invokes the connector to determine which data to read, manages parallelism, and pushes down filter predicates. Connectors can also restrict access to data based on the user who submits the query.

Athena uses data source connectors to run federated queries on underlying data. Athena supports two types of data source connectors with different capabilities:

  • AWS Glue Data Catalog federated connectors – These connectors use an AWS Glue connection to connect to the data source. They can be used with fine-grained data governance control support through Lake Formation. For more information, see Federated catalog data connections in the AWS Lake Formation Developer Guide.

    • Connectors associated with a Lambda can optionally be manually registered as an AWS Glue Data Catalog to be used with Lake Formation for fine-grained data governance

    • Starting April 21, 2026, certain newly created connectors are automatically registered as Glue Data Catalogs and do not use a Lambda function in your AWS account

  • Athena data catalog federated connectors – These connectors are specific to Athena and cannot be registered as federated catalogs with AWS Glue Data Catalog. They require a Lambda function in your AWS account to query data. Custom connectors developed using the Athena Query Federation SDK are Athena data catalog connectors. For more information, see Develop a data source connector using the Athena Query Federation SDK.

For a list of data sources compatible with each type, see Connector type support by data source.

Note

Third party developers may have used the Athena Query Federation SDK to write data source connectors. For support or licensing issues with these data source connectors, please work with your connector provider. These connectors are not tested or supported by AWS.

Considerations and limitations

  • Views – You can create and query views on federated data sources. Federated views are stored in AWS Glue, not the underlying data source. For more information, see Query federated views.

  • Delimited identifiers – Delimited identifiers (also known as quoted identifiers) begin and end with double quotation marks ("). Currently, delimited identifiers are not supported for federated queries in Athena.

  • Write operations – Write operations like INSERT INTO are not supported. Attempting to do so may result in the error message This operation is currently not supported for external catalogs.

  • Pricing – For pricing information, see Amazon Athena pricing.

  • JDBC driver – To use the JDBC driver with federated queries or an external Hive metastore, include MetadataRetrievalMethod=ProxyAPI in your JDBC connection string. For information about the JDBC driver, see Connect to Amazon Athena with JDBC.

  • Secrets Manager – To use the Athena Federated Query feature with AWS Secrets Manager, you must configure an Amazon VPC private endpoint for Secrets Manager. For more information, see Create a Secrets Manager VPC private endpoint in the AWS Secrets Manager User Guide.

  • Passthrough queries – Passthrough queries are not supported after a data source is registered as an AWS Glue Data Catalog.

Connector type support by data source

The following table shows the connector types that each data source supports. Certain AWS Glue Data Catalog federated catalog connectors that you create on or after April 21, 2026, do not require Lambda.

Data source AWS Glue Data Catalog federated connectors Athena data catalog federated connectors
Without Lambda With Lambda
Amazon CloudWatch Logs Yes Yes
Amazon CloudWatch Metrics Yes Yes
Amazon DocumentDB Yes Yes Yes
Amazon DynamoDB Yes Yes Yes
Amazon MSK Yes
Amazon Neptune Yes
Amazon OpenSearch Yes Yes Yes
Amazon Redshift Yes Yes Yes
Amazon Timestream Yes Yes
Azure Data Lake Storage Yes Yes
Azure Synapse Yes Yes
Cloudera Hive Yes Yes
Cloudera Impala Yes Yes
CMDB Yes Yes
Confluent Yes
Custom Yes
Db2 Yes Yes
Db2 iSeries Yes Yes
Google BigQuery Yes Yes Yes
Google Cloud Storage Yes Yes
HBase Yes Yes
Hortonworks (Hive) Yes
Kafka Yes
MySQL Yes Yes Yes
Oracle Yes Yes Yes
PostgreSQL Yes Yes Yes
Redis OSS Yes
SAP HANA Yes Yes Yes
Snowflake Yes Yes Yes
SQL Server Yes Yes Yes
Teradata Yes Yes Yes
TPC-DS Yes Yes
Vertica Yes Yes

Videos

Watch the following videos to learn more about using Athena Federated Query.

Video: Analyze Results of Federated Query in Amazon Athena in Quick

The following video demonstrates how to analyze results of an Athena Federated Query in Quick.

Video: Game Analytics Pipeline

The following video shows how to deploy a scalable serverless data pipeline to ingest, store, and analyze telemetry data from games and services using Amazon Athena federated queries.