Actions, resources, and condition keys for Amazon Athena
Amazon Athena (service prefix: athena) provides the following
service-specific operations, resources, actions, and condition keys for use in IAM permission
policies.
References:
-
Learn how to configure this service.
-
View a list of the API operations available for this service.
-
Learn how to secure this service and its resources by using IAM permission policies.
-
View the programmatic service authorization reference
for this service.
Topics
API operations defined by Amazon Athena
The following table maps API operations to the IAM actions they authorize. Only condition keys that have static values for the given API and action are listed; for the full set of condition keys supported by each action, see the Actions table.
| Operation | IAM action | Condition key | Possible value(s) | Access level |
|---|---|---|---|---|
|
BatchGetNamedQuery |
Read |
|||
|
BatchGetPreparedStatement |
Read |
|||
|
BatchGetQueryExecution |
Read |
|||
|
CancelCapacityReservation |
Write |
|||
|
CreateCapacityReservation |
Write |
|||
Tagging, Write |
||||
|
CreateDataCatalog |
Write |
|||
Tagging, Write |
||||
|
CreateNamedQuery |
Write |
|||
|
CreateNotebook |
Write |
|||
|
CreatePreparedStatement |
Write |
|||
|
CreatePresignedNotebookUrl |
Write |
|||
|
CreateWorkGroup |
Write |
|||
Tagging, Write |
||||
iam:PassedToService |
athena.amazonaws.com |
Write |
||
|
DeleteCapacityReservation |
Write |
|||
|
DeleteDataCatalog |
Write |
|||
|
DeleteNamedQuery |
Write |
|||
|
DeleteNotebook |
Write |
|||
|
DeletePreparedStatement |
Write |
|||
|
DeleteWorkGroup |
Write |
|||
|
ExportNotebook |
Write |
|||
|
GetCalculationExecution |
Read |
|||
|
GetCalculationExecutionCode |
Read |
|||
|
GetCalculationExecutionStatus |
Read |
|||
|
GetCapacityAssignmentConfiguration |
Read |
|||
|
GetCapacityReservation |
Read |
|||
|
GetDataCatalog |
Read |
|||
|
GetDatabase |
Read |
|||
|
GetNamedQuery |
Read |
|||
|
GetNotebookMetadata |
Read |
|||
|
GetPreparedStatement |
Read |
|||
|
GetQueryExecution |
Read |
|||
|
GetQueryResults |
Read |
|||
|
GetQueryRuntimeStatistics |
Read |
|||
|
GetResourceDashboard |
Read |
|||
|
GetSession |
Read |
|||
|
GetSessionEndpoint |
Write |
|||
|
GetSessionStatus |
Read |
|||
|
GetTableMetadata |
Read |
|||
|
GetWorkGroup |
Read |
|||
|
ImportNotebook |
Write |
|||
|
ListApplicationDPUSizes |
List |
|||
|
ListCalculationExecutions |
List |
|||
|
ListCapacityReservations |
List |
|||
|
ListDataCatalogs |
List |
|||
|
ListDatabases |
List |
|||
|
ListEngineVersions |
Read |
|||
|
ListExecutors |
List |
|||
|
ListNamedQueries |
List |
|||
|
ListNotebookMetadata |
List |
|||
|
ListNotebookSessions |
List |
|||
|
ListPreparedStatements |
List |
|||
|
ListQueryExecutions |
Read |
|||
|
ListSessions |
List |
|||
|
ListTableMetadata |
Read |
|||
|
ListTagsForResource |
Read |
|||
|
ListWorkGroups |
List |
|||
|
PutCapacityAssignmentConfiguration |
Write |
|||
|
StartCalculationExecution |
Write |
|||
|
StartQueryExecution |
Write |
|||
|
StartSession |
Read |
|||
Write |
||||
Tagging, Write |
||||
iam:PassedToService |
athena.amazonaws.com |
Write |
||
|
StopCalculationExecution |
Write |
|||
|
StopQueryExecution |
Write |
|||
|
TagResource |
Tagging, Write |
|||
|
TerminateSession |
Write |
|||
|
UntagResource |
Tagging, Write |
|||
|
UpdateCapacityReservation |
Write |
|||
|
UpdateDataCatalog |
Write |
|||
|
UpdateNamedQuery |
Write |
|||
|
UpdateNotebook |
Write |
|||
|
UpdateNotebookMetadata |
Write |
|||
|
UpdatePreparedStatement |
Write |
|||
|
UpdateWorkGroup |
Write |
|||
iam:PassedToService |
athena.amazonaws.com |
Write |
Actions defined by Amazon Athena
You can specify the following actions in the Action element of an IAM
policy statement. Use policies to grant permissions to perform an operation in Amazon. When
you use an action in a policy, you usually allow or deny access to the API operation or CLI
command with the same name. However, in some cases, a single action controls access to more
than one operation. Alternatively, some operations require several different actions.
| Actions | Description | Resource types (*required) | Condition keys | Access level |
|---|---|---|---|---|
Grants permission to get information about one or more named queries |
Read |
|||
Grants permission to get information about one or more prepared statements |
Read |
|||
Grants permission to get information about one or more query executions |
Read |
|||
Grants permission to cancel a capacity reservation |
Write |
|||
Grants permission to cancel query execution. Deprecated. Applies only to Amazon services and principals that use Athena JDBC driver earlier than 1.1.0. Use StopQueryExecution otherwise |
Write |
|||
Grants permission to create a capacity reservation |
Write |
|||
Grants permission to create a datacatalog |
Write |
|||
Grants permission to create a named query |
Write |
|||
Grants permission to create a notebook |
Write |
|||
Grants permission to create a prepared statement |
Write |
|||
Grants permission to create a presigned notebook url |
Write |
|||
Grants permission to create a workgroup |
Write |
|||
Grants permission to delete a capacity reservation |
Write |
|||
Grants permission to delete a datacatalog |
Write |
|||
Grants permission to delete a named query specified |
Write |
|||
Grants permission to delete a notebook |
Write |
|||
Grants permission to delete a prepared statement specified |
Write |
|||
Grants permission to delete a workgroup |
Write |
|||
Grants permission to export a notebook |
Write |
|||
Grants permission to get a calculation execution |
Read |
|||
Grants permission to get a calculation execution code |
Read |
|||
Grants permission to get a calculation execution status |
Read |
|||
Grants permission to get capacity assignment information for a capacity reservation |
Read |
|||
Grants permission to get a capacity reservation |
Read |
|||
Grants permission to enable access to databases and tables. Applies only to Amazon services managed policy and principals that use an Athena JDBC driver version 1.1.0 |
Read |
|||
Grants permission to get a datacatalog |
Read |
|||
Grants permission to get a database for a given datacatalog |
Read |
|||
Grants permission to enable access to the specified database and table. Applies only to Amazon services managed policy and principals that use an Athena JDBC driver version 1.1.0 |
Read |
|||
Grants permission to enable access to databases and tables. Applies only to Amazon services managed policy and principals that use an Athena JDBC driver version 1.1.0 |
Read |
|||
Grants permission to get information about the specified named query |
Read |
|||
Grants permission to enable access to the specified database and table. Applies only to Amazon services managed policy and principals that use an Athena JDBC driver version 1.1.0 |
Read |
|||
Grants permission to enable access to databases and tables. Applies only to Amazon services managed policy and principals that use an Athena JDBC driver version 1.1.0 |
Read |
|||
Grants permission to get notebook metadata |
Read |
|||
Grants permission to get information about the specified prepared statement |
Read |
|||
Grants permission to get information about the specified query execution |
Read |
|||
Grants permission to get query executions. Deprecated. Applies only to Amazon services and principals that use Athena JDBC driver earlier than 1.1.0. Use ListQueryExecutions otherwise |
Read |
|||
Grants permission to get the query results |
Read |
|||
Grants permission to get the query results stream |
Read |
|||
Grants permission to get runtime statistics for the specified query execution |
Read |
|||
Grants permission to get a Live UI/Persistence UI for a session |
Read |
|||
Grants permission to get a session |
Read |
|||
Grants permission to get a connection endpoint and authentication token for a given session Id |
Write |
|||
Grants permission to get a session status |
Read |
|||
Grants permission to enable access to the specified table. Applies only to Amazon services managed policy and principals that use an Athena JDBC driver version 1.1.0 |
Read |
|||
Grants permission to get a metadata about a table for a given datacatalog |
Read |
|||
Grants permission to enable access to tables. Applies only to Amazon services managed policy and principals that use an Athena JDBC driver version 1.1.0 |
Read |
|||
Grants permission to get a workgroup |
Read |
|||
Grants permission to import a notebook |
Write |
|||
Grants permission to return a list of ApplicationRuntimeIds |
List |
|||
Grants permission to return a list of calculation executions |
List |
|||
Grants permission to return a list of capacity reservations for the specified Amazon Web Services account |
List |
|||
Grants permission to return a list of datacatalogs for the specified Amazon Web Services account |
List |
|||
Grants permission to return a list of databases for a given datacatalog |
List |
|||
Grants permission to return a list of athena engine versions for the specified Amazon Web Services account |
Read |
|||
Grants permission to return a list of executors |
List |
|||
Grants permission to return a list of named queries in Amazon Athena for the specified Amazon Web Services account |
List |
|||
Grants permission to return a list of notebooks for a given workgroup |
List |
|||
Grants permission to return a list of sessions for a given notebook |
List |
|||
Grants permission to return a list of prepared statements for the specified workgroup |
List |
|||
Grants permission to return a list of query executions for the specified Amazon Web Services account |
Read |
|||
Grants permission to return a list of sessions for a given workgroup |
List |
|||
Grants permission to return a list of table metadata in a database for a given datacatalog |
Read |
|||
Grants permission to return a list of tags for a resource |
Read |
|||
Grants permission to return a list of workgroups for the specified Amazon Web Services account |
List |
|||
Grants permission to assign capacity from a capacity reservation to queries |
Write |
|||
Grants permission to run a query. Deprecated. Applies only to Amazon services and principals that use Athena JDBC driver earlier than 1.1.0. Use StartQueryExecution otherwise |
Write |
|||
Grants permission to start a calculation execution |
Write |
|||
Grants permission to start a query execution using an SQL query provided as a string |
Write |
|||
Grants permission to start a session |
Write |
|||
Grants permission to stop a calculation execution |
Write |
|||
Grants permission to stop the specified query execution |
Write |
|||
Grants permission to add a tag to a resource |
Tagging, Write |
|||
Grants permission to terminate a session |
Write |
|||
Grants permission to remove a tag from a resource |
Tagging, Write |
|||
Grants permission to update a capacity reservation |
Write |
|||
Grants permission to update a datacatalog |
Write |
|||
Grants permission to update a named query specified |
Write |
|||
Grants permission to update a notebook |
Write |
|||
Grants permission to update notebook metadata |
Write |
|||
Grants permission to update a prepared statement |
Write |
|||
Grants permission to update a workgroup |
Write |
Resource types defined by Amazon Athena
The following resource types are defined by this service and can be used in the
Resource element of IAM permission policy statements.
| Resource types | ARN | Condition keys |
|---|---|---|
arn:${Partition}:athena:${Region}:${Account}:capacity-reservation/${CapacityReservationName} |
||
arn:${Partition}:athena:${Region}:${Account}:datacatalog/${DataCatalogName} |
||
arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName}/session/${SessionId} |
||
arn:${Partition}:athena:${Region}:${Account}:workgroup/${WorkGroupName} |
Condition keys for Amazon Athena
Amazon Athena defines the following condition keys that can be used in the
Condition element of an IAM policy.
| Condition keys | Description | Type |
|---|---|---|
Filters access by the presence of tag key-value pairs in the request |
String |
|
Filters access by the tag key-value pairs attached to the resource |
String |
|
Filters access by the the presence of tag keys in the request |
ArrayOfString |