Skip to content

Commit

Permalink
add missing permission
Browse files Browse the repository at this point in the history
  • Loading branch information
Joel Balcaen committed Apr 5, 2024
1 parent 7fae514 commit 48beea4
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
18 changes: 18 additions & 0 deletions lambdas/rich_pdf_ingestion/lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,23 @@ module "lambda_function_container_image" {
"logs:PutLogEvents",
]
}

s3 = {
effect = "Allow"
actions = [
"s3:Get*",
"s3:List*",
"s3:Describe*",
"s3:PutObject",
"s3-object-lambda:Get*",
"s3-object-lambda:List*",
"s3-object-lambda:WriteGetObjectResponse"
]

resources = [
var.ses_bucket_arn,
"${var.ses_bucket_arn}/*"
]
}
}
}
5 changes: 5 additions & 0 deletions lambdas/rich_pdf_ingestion/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,9 @@ variable "aws_region" {
variable "lambda_repository_name" {
type = string
nullable = false
}

variable "ses_bucket_arn" {
type = string
nullable = false
}
1 change: 1 addition & 0 deletions terraform/modules.tf
Original file line number Diff line number Diff line change
Expand Up @@ -229,4 +229,5 @@ module "rich_pdf_ingestion" {
source = "../lambdas/rich_pdf_ingestion"
aws_region = var.aws_region
lambda_repository_name = var.rich_pdf_ingestion_repository_name
ses_bucket_arn = module.s3_bucket.s3_bucket_arn
}

0 comments on commit 48beea4

Please sign in to comment.