Skip to content

Commit 48f2375

Browse files
committed
removed S3 duplicate elements
1 parent cffef47 commit 48f2375

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

terraform/id_sync_lambda.tf

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -272,26 +272,7 @@ resource "aws_cloudwatch_log_group" "id_sync_log_group" {
272272
retention_in_days = 30
273273
}
274274

275-
# S3 Bucket notification to trigger Lambda function for config bucket
276-
resource "aws_s3_bucket_notification" "config_lambda_notification" {
277-
278-
bucket = aws_s3_bucket.batch_config_bucket.bucket
279-
280-
lambda_function {
281-
lambda_function_arn = aws_lambda_function.id_sync_lambda.arn
282-
events = ["s3:ObjectCreated:*"]
283-
}
284-
}
285-
286-
# Permission for the new S3 bucket to invoke the Lambda function
287-
resource "aws_lambda_permission" "new_s3_invoke_permission" {
288-
289-
statement_id = "AllowExecutionFromNewS3"
290-
action = "lambda:InvokeFunction"
291-
function_name = aws_lambda_function.id_sync_lambda.function_name
292-
principal = "s3.amazonaws.com"
293-
source_arn = local.config_bucket_arn
294-
}
275+
# delete config_lambda_notification / new_s3_invoke_permission - not required; duplicate
295276

296277
# NEW
297278
resource "aws_lambda_event_source_mapping" "id_sync_sqs_trigger" {

0 commit comments

Comments
 (0)