Skip to content

Commit

Permalink
Merge pull request #8328 from ministryofjustice/CC-2891
Browse files Browse the repository at this point in the history
Cc 2891
  • Loading branch information
SahidKhan89 authored Oct 17, 2024
2 parents f681fe8 + 0243551 commit 7905e00
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions terraform/environments/ccms-ebs/ccms-lambda.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

resource "aws_s3_object" "lambda_layer_s3" {
bucket = aws_s3_bucket.lambda_payment_load.bucket
key = "lambda/layer.zip"
source = "lambda/layer.zip"
key = "lambda/layerV2.zip"
source = "lambda/layerV2.zip"
}

# Lambda Layer
Expand Down Expand Up @@ -47,7 +47,7 @@ resource "aws_security_group" "lambda_security_group" {
# Lambda Function
resource "aws_lambda_function" "lambda_function" {
function_name = "${local.application_name}-${local.environment}-payment-load"
filename = "lambda/function.zip"
filename = "lambda/functionV2.zip"
handler = "lambda_function.lambda_handler"
runtime = "python3.10"
role = aws_iam_role.lambda_execution_role.arn
Expand Down Expand Up @@ -89,14 +89,14 @@ resource "aws_lambda_permission" "allow_bucket" {
source_arn = aws_s3_bucket.lambda_payment_load.arn
}

resource "aws_s3_bucket_notification" "lambda_trigger" {
bucket = aws_s3_bucket.lambda_payment_load.id
# resource "aws_s3_bucket_notification" "lambda_trigger" {
# bucket = aws_s3_bucket.lambda_payment_load.id

lambda_function {
lambda_function_arn = aws_lambda_function.lambda_function.arn
events = ["s3:ObjectCreated:*"]
filter_suffix = ".xlsx"
}
# lambda_function {
# lambda_function_arn = aws_lambda_function.lambda_function.arn
# events = ["s3:ObjectCreated:*"]
# filter_suffix = ".xlsx"
# }

depends_on = [aws_lambda_permission.allow_bucket]
}
# depends_on = [aws_lambda_permission.allow_bucket]
# }
Binary file removed terraform/environments/ccms-ebs/lambda/function.zip
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit 7905e00

Please sign in to comment.