Skip to content

Commit

Permalink
fix: add missing IAM permissions for runners from encrypted AMI (#3049)
Browse files Browse the repository at this point in the history
This should fix missing IAM permissions when running from encrypted AMI.
See [this
issue](#2927)
  • Loading branch information
marko-fabry authored Mar 17, 2023
1 parent 1de73bf commit e0819f6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions modules/runners/policies/lambda-scale-up.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@
"kms:Decrypt"
],
"Resource": "${ami_kms_key_arn}"
},
{
"Effect": "Allow",
"Action": [
"kms:CreateGrant"
],
"Resource": "${ami_kms_key_arn}",
"Condition": {
"Bool": {
"aws:ViaAWSService": "true"
}
}
%{ endif ~}
}
]
Expand Down
12 changes: 12 additions & 0 deletions modules/runners/pool/policies/lambda-pool.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@
"kms:Decrypt"
],
"Resource": "${ami_kms_key_arn}"
},
{
"Effect": "Allow",
"Action": [
"kms:CreateGrant"
],
"Resource": "${ami_kms_key_arn}",
"Condition": {
"Bool": {
"aws:ViaAWSService": "true"
}
}
%{ endif ~}
}
]
Expand Down

0 comments on commit e0819f6

Please sign in to comment.