Skip to content

Instantly share code, notes, and snippets.

@wshihadeh
Created April 15, 2020 06:37
Show Gist options
  • Save wshihadeh/d74c27b16477c51cec24ede781ff7ae4 to your computer and use it in GitHub Desktop.
Save wshihadeh/d74c27b16477c51cec24ede781ff7ae4 to your computer and use it in GitHub Desktop.
aws_lambda_permission
resource "aws_lambda_permission" "allow_cloudwatch_stop" {
statement_id = "AllowExecutionFromCloudWatch"
action = "lambda:InvokeFunction"
function_name = "${aws_lambda_function.stop_ec2_lambda.function_name}"
principal = "events.amazonaws.com"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment