Skip to content

Commit be59760

Browse files
authored
CCM-10204: proof request kms fix (#487)
1 parent bbad16e commit be59760

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

infrastructure/terraform/modules/backend-api/module_lambda_request_proof.tf

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ module "request_proof_lambda" {
1616
environment_variables = local.backend_lambda_environment_variables
1717

1818
execution_role_policy_document = data.aws_iam_policy_document.request_proof_lambda_policy.json
19-
log_destination_arn = var.log_destination_arn
19+
log_destination_arn = var.log_destination_arn
2020
log_subscription_role_arn = var.log_subscription_role_arn
2121
}
2222

@@ -48,7 +48,7 @@ data "aws_iam_policy_document" "request_proof_lambda_policy" {
4848
}
4949

5050
statement {
51-
sid = "AllowKMSAccess"
51+
sid = "AllowDdbKMSAccess"
5252
effect = "Allow"
5353

5454
actions = [
@@ -63,4 +63,18 @@ data "aws_iam_policy_document" "request_proof_lambda_policy" {
6363
local.dynamodb_kms_key_arn
6464
]
6565
}
66+
67+
statement {
68+
sid = "AllowSqsKMSAccess"
69+
effect = "Allow"
70+
71+
actions = [
72+
"kms:Decrypt",
73+
"kms:GenerateDataKey",
74+
]
75+
76+
resources = [
77+
var.kms_key_arn,
78+
]
79+
}
6680
}

0 commit comments

Comments
 (0)