File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ Lambda function to handle CodePipeline CloudWatch events and send a notification
55![ Started] ( docs/sample-notification-succeeded.png )
66
77### Deployment
8- Requires Terraform to be installed.
8+ Requires Terraform 0.12+ to be installed.
99
10101 . Change permissions of deployment bash script ` chmod +x deploy.sh `
11112 . Run ` ./deploy.sh ` which will prompt you for the following variables:
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ resource "aws_lambda_function" "lambda" {
33 function_name = " codepipeline-teams-notifications"
44 role = " ${ aws_iam_role . lambda . arn } "
55 handler = " index.handler"
6- source_code_hash = " ${ base64sha256 ( file ( " ../lambda.zip" )) } "
6+ source_code_hash = " ${ filebase64sha256 ( " ../lambda.zip" )}
77 runtime = " nodejs8. 10 "
88 timeout = 20
99
@@ -15,9 +15,9 @@ resource "aws_lambda_function" "lambda" {
1515}
1616
1717resource " aws_lambda_permission" " cloudwatch_execution" {
18- statement_id = " AllowExecutionFromCloudWatch"
19- action = " lambda:InvokeFunction"
20- function_name = " ${ aws_lambda_function . lambda . function_name } "
21- principal = " events.amazonaws.com"
22- source_arn = " ${ aws_cloudwatch_event_rule . codepipeline_event . arn } "
18+ statement_id = " AllowExecutionFromCloudWatch"
19+ action = " lambda: InvokeFunction"
20+ function_name = " ${aws_lambda_function.lambda.function_name}"
21+ principal = " events. amazonaws . com "
22+ source_arn = " ${aws_cloudwatch_event_rule.codepipeline_event.arn}"
2323}
You can’t perform that action at this time.
0 commit comments