Skip to content

Commit 102ac61

Browse files
authored
add get glue job runs (#2274)
botocore.errorfactory.AccessDeniedException: An error occurred (AccessDeniedException) when calling the GetJobRuns operation: User: arn:aws:sts::120038763019:assumed-role/mwaa_execution_role/AmazonMWAA-airflow is not authorized to perform: glue:GetJobRuns on resource: arn:aws:glue:eu-west-2:120038763019:job/Copy parking Liberator landing zone to raw because no identity-based policy allows the glue:GetJobRuns action
1 parent 1ed7ee4 commit 102ac61

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

terraform/modules/department/50-aws-iam-policies.tf

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ data "aws_iam_policy_document" "read_only_s3_department_access" {
104104
[additional_access_item.value.bucket_arn],
105105
additional_access_item.value.paths == null ? [
106106
"${additional_access_item.value.bucket_arn}/*"
107-
] : [
107+
] : [
108108
for path in additional_access_item.value.paths : "${additional_access_item.value.bucket_arn}/${path}/*"
109109
]
110110
)
@@ -285,14 +285,14 @@ data "aws_iam_policy_document" "s3_department_access" {
285285
for_each = var.additional_s3_access
286286
iterator = additional_access_item
287287
content {
288-
sid = "AdditionalS3FullAccess${replace(additional_access_item.value.bucket_arn, "/[^a-zA-Z0-9]/", "")}"
289-
effect = "Allow"
288+
sid = "AdditionalS3FullAccess${replace(additional_access_item.value.bucket_arn, "/[^a-zA-Z0-9]/", "")}"
289+
effect = "Allow"
290290
actions = additional_access_item.value.actions
291291
resources = concat(
292292
[additional_access_item.value.bucket_arn],
293293
additional_access_item.value.paths == null ? [
294294
"${additional_access_item.value.bucket_arn}/*"
295-
] : [
295+
] : [
296296
for path in additional_access_item.value.paths : "${additional_access_item.value.bucket_arn}/${path}/*"
297297
]
298298
)
@@ -947,7 +947,8 @@ data "aws_iam_policy_document" "airflow_base_policy" {
947947
"glue:GetCrawler",
948948
"glue:CreateTable",
949949
"glue:UpdateTable",
950-
"glue:DeleteTable"
950+
"glue:DeleteTable",
951+
"glue:GetJobRuns"
951952
]
952953
resources = ["*"]
953954
}
@@ -1078,5 +1079,3 @@ resource "aws_iam_policy" "mtfh_access_policy" {
10781079
description = "Allows ${local.department_identifier} department access for ecs tasks to mtfh/ subdirectory in landing zone"
10791080
policy = data.aws_iam_policy_document.mtfh_access[0].json
10801081
}
1081-
1082-

0 commit comments

Comments
 (0)