Skip to content

Instantly share code, notes, and snippets.

@andreidiaconu90
Created September 11, 2020 07:11
Show Gist options
  • Save andreidiaconu90/08a542365326b7d6094b53fdb25b8573 to your computer and use it in GitHub Desktop.
Save andreidiaconu90/08a542365326b7d6094b53fdb25b8573 to your computer and use it in GitHub Desktop.
webhook-iam-role
MyCloudWatchWebHookRole:
Type: "AWS::IAM::Role"
Properties:
AssumeRolePolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Principal:
Service:
- events.amazonaws.com
Action: "sts:AssumeRole"
Path: /
Policies:
- PolicyName: my-pipeline-webhook-role
PolicyDocument:
Version: "2012-10-17"
Statement:
- Effect: Allow
Action: "codepipeline:StartPipelineExecution"
Resource: !Join
- ""
- - "arn:aws:codepipeline:*:"
- !Ref "AWS::AccountId"
- ":"
- !Ref ResourcesCodePipeline
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment