Amazon Athena
User Guide

Benefits of Using Workgroups

Workgroups allow you to:

Isolate users, teams, applications, or workloads into groups.

Each workgroup has its own distinct query history and a list of saved queries. For more information, see How Workgroups Work.

For all queries in the workgroup, you can choose to configure workgroup settings. They include an Amazon S3 location for storing query results, and encryption configuration. You can also enforce workgroup settings. For more information, see Workgroup Settings.

Enforce costs constraints.

You can set two types of cost constraints for queries in a workgroup:

  • Per-query limit is a threshold for the amount of data scanned for each query. Athena cancels queries when they exceed the specified threshold. The limit applies to each running query within a workgroup. You can set only one per-query limit and update it if needed.

  • Per-workgroup limit is a threshold you can set for each workgroup for the amount of data scanned by queries in the workgroup. Breaching a threshold activates an Amazon SNS alarm that triggers an action of your choice, such as sending an email to a specified user. You can set multiple per-workgroup limits for each workgroup.

For detailed steps, see Setting Data Usage Control Limits.

Track query-related metrics for all workgroup queries in CloudWatch.

For each query that runs in a workgroup, if you configure the workgroup to publish metrics, Athena publishes them to CloudWatch. You can view query metrics for each of your workgroups within the Athena console. In CloudWatch, you can create custom dashboards, and set thresholds and alarms on these metrics.