We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1ee9197 commit 8675025Copy full SHA for 8675025
1 file changed
infrastructure/terraform/components/api/sns_topic_subscription_amendments_queue.tf
@@ -1,6 +1,13 @@
1
-resource "aws_sns_topic_subscription" "amendments_queue" {
2
- topic_arn = module.eventsub.sns_topic_supplier.arn
3
- protocol = "sqs"
4
- endpoint = module.amendments_queue.sqs_queue_arn
5
- #raw_message_delivery = false
+resource "aws_sns_topic_subscription" "allocation_lambda" {
+ topic_arn = module.eventsub.sns_topic_event_bus.arn
+ protocol = "lambda"
+ endpoint = module.allocation_lambda.function_arn
+}
6
+
7
+resource "aws_lambda_permission" "allocation_lambda_sns" {
8
+ statement_id = "AllowExecutionFromSNS"
9
+ action = "lambda:InvokeFunction"
10
+ function_name = module.allocation_lambda.function_name
11
+ principal = "sns.amazonaws.com"
12
+ source_arn = module.eventsub.sns_topic_supplier.arn
13
}
0 commit comments