cloudformation/continuous-integration-branch-checks.yml [54:121]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              }
    Type: AWS::Events::Rule

  SourceEventRole:
    Description: IAM role to allow Amazon CloudWatch Events to trigger AWS CodeBuild build
    Properties:
      AssumeRolePolicyDocument:
        Statement:
        - Action: sts:AssumeRole
          Effect: Allow
          Principal:
            Service:
            - events.amazonaws.com
          Sid: 1
      Policies:
      - PolicyDocument:
          Statement:
          - Action:
            - codebuild:StartBuild
            Effect: Allow
            Resource: !GetAtt 'CodeBuildProject.Arn'
        PolicyName: !Join
          - '-'
          - - !Ref 'AWS::StackName'
            - CloudWatchEventPolicy
      RoleName: !Join
        - '-'
        - - !Ref 'AWS::StackName'
          - CloudWatchEventRule
    Type: AWS::IAM::Role

  CodeBuildPolicy:
    Description: Setting IAM policy for service role for CodeBuild
    Properties:
      PolicyDocument:
        Statement:
        - Action:
          - logs:CreateLogGroup
          - logs:CreateLogStream
          - logs:PutLogEvents
          Effect: Allow
          Resource: '*'
        - Action:
          - codecommit:GitPull
          Effect: Allow
          Resource:
          - !Join
            - ':'
            - - arn
              - aws
              - codecommit
              - !Ref 'AWS::Region'
              - !Ref 'AWS::AccountId'
              - !Ref CodeCommitRepoName
      PolicyName: !Join
        - '-'
        -  - !Ref 'AWS::StackName'
           - CodeBuildPolicy
      Roles:
      - !Ref 'CodeBuildRole'
    Type: AWS::IAM::Policy

  CodeBuildProject:
    DependsOn:
    - CodeBuildPolicy
    Properties:
      Artifacts:
        Type: NO_ARTIFACTS
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



cloudformation/continuous-integration-pull-request-checks.yml [97:164]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
              }
    Type: AWS::Events::Rule

  SourceEventRole:
    Description: IAM role to allow Amazon CloudWatch Events to trigger AWS CodeBuild build
    Properties:
      AssumeRolePolicyDocument:
        Statement:
        - Action: sts:AssumeRole
          Effect: Allow
          Principal:
            Service:
            - events.amazonaws.com
          Sid: 1
      Policies:
      - PolicyDocument:
          Statement:
          - Action:
            - codebuild:StartBuild
            Effect: Allow
            Resource: !GetAtt 'CodeBuildProject.Arn'
        PolicyName: !Join
          - '-'
          - - !Ref 'AWS::StackName'
            - CloudWatchEventPolicy
      RoleName: !Join
        - '-'
        - - !Ref 'AWS::StackName'
          - CloudWatchEventRule
    Type: AWS::IAM::Role

  CodeBuildPolicy:
    Description: Setting IAM policy for service role for CodeBuild
    Properties:
      PolicyDocument:
        Statement:
        - Action:
          - logs:CreateLogGroup
          - logs:CreateLogStream
          - logs:PutLogEvents
          Effect: Allow
          Resource: '*'
        - Action:
          - codecommit:GitPull
          Effect: Allow
          Resource:
          - !Join
            - ':'
            - - arn
              - aws
              - codecommit
              - !Ref 'AWS::Region'
              - !Ref 'AWS::AccountId'
              - !Ref CodeCommitRepoName
      PolicyName: !Join
        - '-'
        -  - !Ref 'AWS::StackName'
           - CodeBuildPolicy
      Roles:
      - !Ref 'CodeBuildRole'
    Type: AWS::IAM::Policy

  CodeBuildProject:
    DependsOn:
    - CodeBuildPolicy
    Properties:
      Artifacts:
        Type: NO_ARTIFACTS
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



