initial-pipeline/pipeline-setup.yml [342:385]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  CBDFEventRule:
    Type: "AWS::Events::Rule"
    Properties:
      Name: !Join [ '-', [ !Ref ResourceName, 'codebuild-dockerfile'  ] ]
      Description: "Triggers when builds fail/pass in CodeBuild for the static analysis of the Dockerfile."
      EventPattern:
        source:
          - "aws.codebuild"
        detail-type:
          - "CodeBuild Build State Change"
        detail:
          build-status:
            - "FAILED"
            - "SUCCEEDED"
          project-name:
            - !Ref CodeBuildDFProject
      State: "ENABLED"
      Targets:
        - Arn: !GetAtt LambdaCBDF.Arn
          Id: !Join [ '-', [ !Ref ResourceName, 'codebuild-dockerfile'  ] ]

  LambdaCBDF: 
    Type: "AWS::Lambda::Function"
    Properties: 
      FunctionName: !Join [ '-', [ !Ref ResourceName, 'codebuild-dockerfile'  ] ]
      Description: "Adds a comment to the pull request regarding the success or failure of the Dockerfile static analysis codebuild."
      Handler: "index.handler"
      Environment:
        Variables:
          PREFIX: !Ref ResourceName
          CODEBUILDDFPROJECT: !Ref CodeBuildDFProject
      Role: !GetAtt 'LambdaPRCommentRole.Arn'
      Code:
        ZipFile: |
          from __future__ import print_function
          import boto3
          import os
          import json

          codecommit_client = boto3.client('codecommit')
          ssm = boto3.client('ssm')
          dfproject = os.environ['CODEBUILDDFPROJECT']

          def handler(event, context):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



supplemental/pipeline-setup-final.yml [437:480]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  CBDFEventRule:
    Type: "AWS::Events::Rule"
    Properties:
      Name: !Join [ '-', [ !Ref ResourceName, 'codebuild-dockerfile'  ] ]
      Description: "Triggers when builds fail/pass in CodeBuild for the static analysis of the Dockerfile."
      EventPattern:
        source:
          - "aws.codebuild"
        detail-type:
          - "CodeBuild Build State Change"
        detail:
          build-status:
            - "FAILED"
            - "SUCCEEDED"
          project-name:
            - !Ref CodeBuildDFProject
      State: "ENABLED"
      Targets:
        - Arn: !GetAtt LambdaCBDF.Arn
          Id: !Join [ '-', [ !Ref ResourceName, 'codebuild-dockerfile'  ] ]

  LambdaCBDF: 
    Type: "AWS::Lambda::Function"
    Properties: 
      FunctionName: !Join [ '-', [ !Ref ResourceName, 'codebuild-dockerfile'  ] ]
      Description: "Adds a comment to the pull request regarding the success or failure of the Dockerfile static analysis codebuild."
      Handler: "index.handler"
      Environment:
        Variables:
          PREFIX: !Ref ResourceName
          CODEBUILDDFPROJECT: !Ref CodeBuildDFProject
      Role: !GetAtt 'LambdaPRCommentRole.Arn'
      Code:
        ZipFile: |
          from __future__ import print_function
          import boto3
          import os
          import json

          codecommit_client = boto3.client('codecommit')
          ssm = boto3.client('ssm')
          dfproject = os.environ['CODEBUILDDFPROJECT']

          def handler(event, context):
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



