Skip to content

Commit

Permalink
Added athena min permissions (#14002)
Browse files Browse the repository at this point in the history
  • Loading branch information
OnkarVO7 authored Nov 17, 2023
1 parent 5f34bd0 commit 8b8c80e
Show file tree
Hide file tree
Showing 4 changed files with 132 additions and 28 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,47 @@ And is defined as:
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"athena:GetTableMetadata",
"athena:ListDatabases",
"athena:ListTableMetadata",
"athena:GetQueryExecution",
"athena:ListDatabases",
"athena:GetTableMetadata",
"athena:ListQueryExecutions",
"athena:StartQueryExecution",
"athena:GetQueryExecution",
"athena:GetQueryResults",
"glue:GetDatabases",
"athena:BatchGetQueryExecution"
],
"Effect": "Allow",
"Resource": [
"arn:aws:athena:us-east-2:<ACCOUNT_ID>:workgroup/your_workgroup",
"arn:aws:athena:us-east-2:<ACCOUNT_ID>:datacatalog/your_datacatalog"
]
},
{
"Action": [
"glue:GetTables",
"glue:GetTable",
"lakeformation:GetDataAccess"
"glue:GetDatabases"
],
"Effect": "Allow",
"Resource": [
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:table/default/*",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:table/mydatabase/*",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:database/default",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:database/mydatabase",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:catalog"
]
},
{
"Action": [
"s3:ListBucket",
"s3:GetObject",
"s3:GetBucketLocation",
"s3:PutObject"
],
"Effect": "Allow",
"Resource": [
"*"
"arn:aws:s3:::athena-bucket/*"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,47 @@ And is defined as:
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"athena:GetTableMetadata",
"athena:ListDatabases",
"athena:ListTableMetadata",
"athena:GetQueryExecution",
"athena:ListDatabases",
"athena:GetTableMetadata",
"athena:ListQueryExecutions",
"athena:StartQueryExecution",
"athena:GetQueryExecution",
"athena:GetQueryResults",
"glue:GetDatabases",
"athena:BatchGetQueryExecution"
],
"Effect": "Allow",
"Resource": [
"arn:aws:athena:us-east-2:<ACCOUNT_ID>:workgroup/your_workgroup",
"arn:aws:athena:us-east-2:<ACCOUNT_ID>:datacatalog/your_datacatalog"
]
},
{
"Action": [
"glue:GetTables",
"glue:GetTable",
"lakeformation:GetDataAccess"
"glue:GetDatabases"
],
"Effect": "Allow",
"Resource": [
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:table/default/*",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:table/mydatabase/*",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:database/default",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:database/mydatabase",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:catalog"
]
},
{
"Action": [
"s3:ListBucket",
"s3:GetObject",
"s3:GetBucketLocation",
"s3:PutObject"
],
"Effect": "Allow",
"Resource": [
"*"
"arn:aws:s3:::athena-bucket/*"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,21 +67,47 @@ And is defined as:
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"athena:GetTableMetadata",
"athena:ListDatabases",
"athena:ListTableMetadata",
"athena:GetQueryExecution",
"athena:ListDatabases",
"athena:GetTableMetadata",
"athena:ListQueryExecutions",
"athena:StartQueryExecution",
"athena:GetQueryExecution",
"athena:GetQueryResults",
"glue:GetDatabases",
"athena:BatchGetQueryExecution"
],
"Effect": "Allow",
"Resource": [
"arn:aws:athena:us-east-2:<ACCOUNT_ID>:workgroup/your_workgroup",
"arn:aws:athena:us-east-2:<ACCOUNT_ID>:datacatalog/your_datacatalog"
]
},
{
"Action": [
"glue:GetTables",
"glue:GetTable",
"lakeformation:GetDataAccess"
"glue:GetDatabases"
],
"Effect": "Allow",
"Resource": [
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:table/default/*",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:table/mydatabase/*",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:database/default",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:database/mydatabase",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:catalog"
]
},
{
"Action": [
"s3:ListBucket",
"s3:GetObject",
"s3:GetBucketLocation",
"s3:PutObject"
],
"Effect": "Allow",
"Resource": [
"*"
"arn:aws:s3:::athena-bucket/*"
]
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,21 +71,47 @@ And is defined as:
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"athena:GetTableMetadata",
"athena:ListDatabases",
"athena:ListTableMetadata",
"athena:GetQueryExecution",
"athena:ListDatabases",
"athena:GetTableMetadata",
"athena:ListQueryExecutions",
"athena:StartQueryExecution",
"athena:GetQueryExecution",
"athena:GetQueryResults",
"glue:GetDatabases",
"athena:BatchGetQueryExecution"
],
"Effect": "Allow",
"Resource": [
"arn:aws:athena:us-east-2:<ACCOUNT_ID>:workgroup/your_workgroup",
"arn:aws:athena:us-east-2:<ACCOUNT_ID>:datacatalog/your_datacatalog"
]
},
{
"Action": [
"glue:GetTables",
"glue:GetTable",
"lakeformation:GetDataAccess"
"glue:GetDatabases"
],
"Effect": "Allow",
"Resource": [
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:table/default/*",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:table/mydatabase/*",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:database/default",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:database/mydatabase",
"arn:aws:glue:us-east-2:<ACCOUNT_ID>:catalog"
]
},
{
"Action": [
"s3:ListBucket",
"s3:GetObject",
"s3:GetBucketLocation",
"s3:PutObject"
],
"Effect": "Allow",
"Resource": [
"*"
"arn:aws:s3:::athena-bucket/*"
]
}
]
Expand Down

0 comments on commit 8b8c80e

Please sign in to comment.