Amazon Athena
User Guide

Monitoring Athena Queries with CloudWatch Metrics

Athena publishes query-related metrics to Amazon CloudWatch, when Publish to CloudWatch is selected. You can create custom dashboards, set alarms and triggers on metrics in CloudWatch, or use pre-populated dashboards directly from the Athena console.

When you enable query metrics for queries in workgroups, the metrics are displayed within the Metrics tab in the Workgroups panel, for each workgroup in the Athena console.

Athena publishes the following metrics to the CloudWatch console:

  • Query Status (successful, failed, or canceled)

  • Query Execution Time (in seconds)

  • Query Type (DDL or DML)

  • Data Processed Per Query. This is the total amount of data scanned per query (in Megabytes).

  • Workgroup Name

To view query metrics for a workgroup in the console

  1. Open the Athena console at

  2. Choose the Workgroup:<name> tab.

    To view a workgroup's metrics, you don't need to switch to it and can remain in another workgroup. You do need to select the workgroup from the list. You also must have permissions to view its metrics.

  3. Select the workgroup from the list, and then choose View details. If you have permissions, the workgroup's details display in the Overview tab.

  4. Choose the Metrics tab.

                  The workgroup metrics screenshot.

    As a result, the metrics display.

  5. Choose the metrics interval that Athena should use to fetch the query metrics from CloudWatch, or choose the refresh icon to refresh the displayed metrics.

                  The screenshot of query metrics intervals.

To view metrics in the Amazon CloudWatch console

  1. Open the Amazon CloudWatch console at

  2. In the navigation pane, choose Metrics.

  3. Select the AWS/Athena namespace.

To view metrics with the CLI

  • Open a command prompt, and use the following command:

    aws cloudwatch list-metrics --namespace "AWS/Athena"
  • To list all available metrics, use the following command:

    aws cloudwatch list-metrics --namespace "AWS/Athena"

List of CloudWatch Metrics for Athena

If you've enabled CloudWatch metrics in Athena, it sends the following metrics to CloudWatch. The metrics use the AWS/Athena namespace.

Metric Name Description
Total amount of data scanned per query

The amount of data in Megabytes that Athena scanned per query. For queries that were canceled (either by the users, or automatically, if they reached the limit), this includes the amount of data scanned before the cancellation time.

Query state

The query state.

Valid statistics: Successful, Failed, Canceled

Total query execution time

The amount of time in seconds it takes Athena to run the query.

Query type

The query type.

Valid statistics: DDL or DML.

Workgroup name

The name of the workgroup.