part_4/template.yaml [30:71]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            BucketName: !Ref SrcBucket
      Environment:
        Variables:
          slackEndpoint: !Ref slackUrl
          bucket: !Ref SrcBucket
      Events:
        HttpApiEvent:
          Type: HttpApi
          Properties:
            Path: /
            Method: POST
      
  
  PushWebhookHandler:
    Type: AWS::Serverless::Function
    Description: A github webhook handler when repo is forked
    Properties:
      CodeUri: src_push/
      Handler: app.handler
      Runtime: nodejs12.x
      Timeout: 3
      Policies:
        - S3WritePolicy:
            BucketName: !Ref SrcBucket
      Environment:
        Variables:
          slackEndpoint: !Ref slackUrl
          bucket: !Ref SrcBucket
      Events:
        HttpApiEvent:
          Type: HttpApi
          Properties:
            Path: /push
            Method: POST

  SrcBucket:
    Type: AWS::S3::Bucket

##########################################################################
#   Stack outputs                                                        #
##########################################################################
Outputs:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



part_5/template.yaml [30:74]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
            BucketName: !Ref SrcBucket
       # Un-comment the following 2 lines to grant S3 read permissions     
       #- S3WritePolicy: 
        #   BucketName: !Ref SrcBucket
      Environment:
        Variables:
          slackEndpoint: !Ref slackUrl
          bucket: !Ref SrcBucket
      Events:
        HttpApiEvent:
          Type: HttpApi
          Properties:
            Path: /
            Method: POST
      
  
  PushWebhookHandler:
    Type: AWS::Serverless::Function
    Description: A github webhook handler when repo is forked
    Properties:
      CodeUri: src_push/
      Handler: app.handler
      Runtime: nodejs12.x
      Timeout: 3
      Policies:
        - S3WritePolicy:
            BucketName: !Ref SrcBucket
      Environment:
        Variables:
          slackEndpoint: !Ref slackUrl
          bucket: !Ref SrcBucket
      Events:
        HttpApiEvent:
          Type: HttpApi
          Properties:
            Path: /push
            Method: POST

  SrcBucket:
    Type: AWS::S3::Bucket

##########################################################################
#   Stack outputs                                                        #
##########################################################################
Outputs:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



