Last active
October 8, 2018 06:27
-
-
Save klausbadelt/6e2e4c6c2db4ac6cfcad54c21481f5d7 to your computer and use it in GitHub Desktop.
CloudFormation template excerpt - Lambda policy and CloudWatch event rule
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WebPipelineNotifyPolicy: | |
Type: AWS::Lambda::Permission | |
Properties: | |
Action: lambda:InvokeFunction | |
FunctionName: !GetAtt WebPipelineNotifyFunction.Arn | |
Principal: events.amazonaws.com | |
SourceArn: !GetAtt WebPipelineNotifyRule.Arn | |
WebPipelineNotifyRule: | |
Type: AWS::Events::Rule | |
Properties: | |
Description: Triggers notification on pipeline state changes ie deploys | |
EventPattern: | |
detail-type: | |
- CodePipeline Pipeline Execution State Change | |
source: | |
- aws.codepipeline | |
State: ENABLED | |
Targets: | |
- Arn: !GetAtt WebPipelineNotifyFunction.Arn | |
Id: WebPipelineNotifyFunction |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment