Skip to content

Instantly share code, notes, and snippets.

@manavskohli
Last active February 14, 2019 18:37
Show Gist options
  • Save manavskohli/799d0440b87beb62a313844cdf616087 to your computer and use it in GitHub Desktop.
Save manavskohli/799d0440b87beb62a313844cdf616087 to your computer and use it in GitHub Desktop.
# ...
resource "aws_lambda_permission" "with_sns_1" {
statement_id = "AllowExecutionFromSNS"
action = "lambda:InvokeFunction"
function_name = "${aws_lambda_function.source_to_target_1_sync.function_name}"
principal = "sns.amazonaws.com"
source_arn = "${aws_sns_topic.s3_fanout.arn}"
}
resource "aws_lambda_permission" "with_sns_2" {
statement_id = "AllowExecutionFromSNS"
action = "lambda:InvokeFunction"
function_name = "${aws_lambda_function.source_to_target_2_sync.function_name}"
principal = "sns.amazonaws.com"
source_arn = "${aws_sns_topic.s3_fanout.arn}"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment