-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlambda.tf
55 lines (50 loc) · 1.7 KB
/
lambda.tf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#
# splitQuery Lambda Function
#
resource "aws_lambda_permission" "SNSsplitQuery" {
statement_id = "SBeaconBackendAllowSNSsplitQueryInvoke"
action = "lambda:InvokeFunction"
function_name = module.lambda-splitQuery.lambda_function_arn
principal = "sns.amazonaws.com"
source_arn = aws_sns_topic.splitQuery.arn
}
#
# performQuery Lambda Function
#
resource "aws_lambda_permission" "SNSperformQuery" {
statement_id = "SBeaconBackendAllowSNSperformQueryInvoke"
action = "lambda:InvokeFunction"
function_name = module.lambda-performQuery.lambda_function_arn
principal = "sns.amazonaws.com"
source_arn = aws_sns_topic.performQuery.arn
}
#
# admin Lambda Function
#
resource "aws_lambda_permission" "SNSemailNotification" {
statement_id = "SBeaconBackendAllowSNSemailNotificationInvoke"
action = "lambda:InvokeFunction"
function_name = module.lambda-logEmailDelivery.lambda_function_arn
principal = "sns.amazonaws.com"
source_arn = aws_sns_topic.sesDeliveryLogger.arn
}
#
# updateFiles Lambda Function
#
resource "aws_lambda_permission" "S3updateFiles" {
statement_id = "SBeaconBackendAllowS3updateFilesInvoke"
action = "lambda:InvokeFunction"
function_name = module.lambda-updateFiles.lambda_function_arn
principal = "s3.amazonaws.com"
source_arn = aws_s3_bucket.dataportal-bucket.arn
}
#
# deidentifyFiles Lambda Function
#
resource "aws_lambda_permission" "S3deidentifyFiles" {
statement_id = "SBeaconBackendAllowS3deidentifyFilesInvoke"
action = "lambda:InvokeFunction"
function_name = module.lambda-deidentifyFiles.lambda_function_arn
principal = "s3.amazonaws.com"
source_arn = aws_s3_bucket.dataportal-bucket.arn
}