AWS service integrations with Athena - Amazon Athena

AWS service integrations with Athena

You can use Athena to query data from the AWS services listed in this section. To see the Regions that each service supports, see Regions and endpoints in the Amazon Web Services General Reference.

For information about each integration, see the following sections.

AWS CloudFormation
Capacity reservation

Reference topic: AWS::Athena::CapacityReservation in the AWS CloudFormation User Guide

Specifies a capacity reservation with the provided name and number of requested data processing units. For more information, see Managing query processing capacity in the Amazon Athena User Guide and CreateCapacityReservation in the Amazon Athena API Reference.

Data catalog

Reference topic: AWS::Athena::DataCatalog in the AWS CloudFormation User Guide

Specify an Athena data catalog, including a name, description, type, parameters, and tags. For more information, see Understanding tables, databases, and data catalogs in the Amazon Athena User Guide and CreateDataCatalog in the Amazon Athena API Reference.

Named query

Reference topic: AWS::Athena::NamedQuery in the AWS CloudFormation User Guide

Specify named queries with AWS CloudFormation and run them in Athena. Named queries allow you to map a query name to a query and then run it as a saved query from the Athena console. For more information, see Using saved queries in the Amazon Athena User Guide and CreateNamedQuery in the Amazon Athena API Reference.

Prepared statement

Reference topic: AWS::Athena::PreparedStatement in the AWS CloudFormation User Guide

Specifies a prepared statement for use with SQL queries in Athena. A prepared statement contains parameter placeholders whose values are supplied at execution time. For more information, see Using parameterized queries in the Amazon Athena User Guide and CreatePreparedStatement in the Amazon Athena API Reference.

Workgroup

Reference topic: AWS::Athena::WorkGroup in the AWS CloudFormation User Guide

Specify Athena workgroups using AWS CloudFormation. Use Athena workgroups to isolate queries for you or your group from other queries in the same account. For more information, see Using workgroups to control query access and costs in the Amazon Athena User Guide and CreateWorkGroup in the Amazon Athena API Reference.

Amazon CloudFront

Reference topic: Querying Amazon CloudFront logs

Use Athena to query Amazon CloudFront logs. For more information about using CloudFront, see the Amazon CloudFront Developer Guide.

AWS CloudTrail

Reference topic: Querying AWS CloudTrail logs

Using Athena with CloudTrail logs is a powerful way to enhance your analysis of AWS service activity. For example, you can use queries to identify trends and further isolate activity by attribute, such as source IP address or user. You can create tables for querying logs directly from the CloudTrail console, and use those tables to run queries in Athena. For more information, see Using the CloudTrail console to create an Athena table for CloudTrail logs .

Amazon DataZone

Reference topic: Using Amazon DataZone in Athena

Use Amazon DataZone to share, search, and discover data at scale across organizational boundaries. DataZone simplifies your experience across AWS analytics services like Athena, AWS Glue, and AWS Lake Formation. If you have large amounts of data in different data sources, you can use Amazon DataZone to build business use case based groupings of people, data and tools.

In Athena, you can use the query editor to access and query DataZone environments. For more information, see Using Amazon DataZone in Athena.

Elastic Load Balancing

Reference topic: Querying Application Load Balancer logs

Querying Application Load Balancer logs allows you to see the source of traffic, latency, and bytes transferred to and from Elastic Load Balancing instances and backend applications. For more information, see Querying Application Load Balancer logs.

Reference topic: Querying Classic Load Balancer logs

Query Classic Load Balancer logs to analyze and understand traffic patterns to and from Elastic Load Balancing instances and backend applications. You can see the source of traffic, latency, and bytes transferred. For more information, see Creating the Table for ELB Logs.

Amazon EMR Studio

Reference topic: Use the Amazon Athena SQL editor in EMR Studio

You can use Athena in an EMR Studio to develop and run interactive queries. This makes it possible for you to use EMR Studio for SQL analytics on Athena from the same Amazon EMR interface that you use for your Spark, Scala, and other workloads. With the Athena integration in EMR Studio, you can perform the following tasks:

  • Perform Athena SQL queries

  • View query results

  • View query history

  • View saved queries

  • Perform parameterized queries

  • View databases, tables, and views for a data catalog

The following Athena features are not available in Amazon EMR Studio:

  • Admin features like creating or updating Athena workgroups, data sources, or capacity reservations

  • Athena for Spark or Spark notebooks

  • DataZone integration

  • Step Functions

EMR Studio integration with Athena is available in all AWS Regions where EMR Studio and Athena are available. For more information about using Athena in EMR Studio, see Use the Amazon Athena SQL editor in EMR Studio in the Amazon EMR Management Guide.

AWS Glue Data Catalog

Reference topic: Integration with AWS Glue

Athena integrates with the AWS Glue Data Catalog, which offers a persistent metadata store for your data in Amazon S3. This allows you to create tables and query data in Athena based on a central metadata store available throughout your Amazon Web Services account and integrated with the ETL and data discovery features of AWS Glue. For more information, see Integration with AWS Glue and What is AWS Glue in the AWS Glue Developer Guide.

AWS Identity and Access Management (IAM)

Reference topic: Actions for Amazon Athena

You can use Athena API actions in IAM permission policies. For more information, see Actions for Amazon Athena and Identity and access management in Athena.

Amazon QuickSight

Reference topic: Connecting to Amazon Athena with ODBC and JDBC drivers

Athena integrates with Amazon QuickSight for easy data visualization. You can use Athena to generate reports or to explore data with business intelligence tools or SQL clients connected with a JDBC or an ODBC driver. For more information about Amazon QuickSight, see What is Amazon QuickSight in the Amazon QuickSight User Guide. For information about using JDBC and ODBC drivers with Athena, see Connecting to Amazon Athena with ODBC and JDBC Drivers.

Amazon S3 Inventory

Reference topic: Querying inventory with Athena in the Amazon Simple Storage Service User Guide

You can use Amazon Athena to query Amazon S3 inventory using standard SQL. You can use Amazon S3 inventory to audit and report on the replication and encryption status of your objects for business, compliance, and regulatory needs. For more information, see Amazon S3 inventory in the Amazon Simple Storage Service User Guide.

AWS Step Functions

Reference topic: Call Athena with Step Functions in the AWS Step Functions Developer Guide

Call Athena with AWS Step Functions. AWS Step Functions can control select AWS services directly using the Amazon States Language. You can use Step Functions with Athena to start and stop query execution, get query results, run ad-hoc or scheduled data queries, and retrieve results from data lakes in Amazon S3. The Step Functions role must have permissions to use Athena. For more information, see the AWS Step Functions Developer Guide.

Video: Orchestrate Amazon Athena Queries using AWS Step Functions

The following video demonstrates how to use Amazon Athena and AWS Step Functions to run a regularly scheduled Athena query and generate a corresponding report.

For an example that uses Step Functions and Amazon EventBridge to orchestrate AWS Glue DataBrew, Athena, and Amazon QuickSight, see Orchestrating an AWS Glue DataBrew job and Amazon Athena query with AWS Step Functions in the AWS Big Data Blog.

AWS Systems Manager Inventory

Reference topic: Querying inventory data from multiple regions and accounts in the AWS Systems Manager User Guide

AWS Systems Manager Inventory integrates with Amazon Athena to help you query inventory data from multiple AWS Regions and accounts. For more information, see the AWS Systems Manager User Guide.

Amazon Virtual Private Cloud

Reference topic: Querying Amazon VPC flow logs

Amazon Virtual Private Cloud flow logs capture information about the IP traffic going to and from network interfaces in a VPC. Query the logs in Athena to investigate network traffic patterns and identify threats and risks across your Amazon VPC network. For more information about Amazon VPC, see the Amazon VPC User Guide.