<commit_before>
service: SLS-GithubToS3

custom:
  # Provide Github Personal Access Token here
  # https://github.com/settings/tokens
  github_personal_access_token: <PASSWORD>

provider:
  name: aws
  runtime: nodejs8.10
  # Stage name goes here (eg: dev/prod/v1)
  stage: v1
  # Make sure this matches the region you are using
  region: us-east-1

  iamRoleStatements:
    # Required to be able to sync files from the repo to the S3 bucket
    - Effect: "Allow"
      Action:
        - "s3:ListBucket"
        - "s3:GetBucketLocation"
        - "s3:PutObject"
        - "s3:GetObject"
        - "s3:DeleteObject"
      # List all S3 buckets this should have permissions to deploy to below
      Resource:
        - "arn:aws:s3:::www.cathymunz.com*"
        - "arn:aws:s3:::dev.cathymunz.com*"
        - "arn:aws:s3:::githubtos3.kylemunz.com*"
        - "arn:aws:s3:::githubtos3-dev.kylemunz.com*"
        - "arn:aws:s3:::www.kylemunz.com*"
        - "arn:aws:s3:::dev.kylemunz.com*"
    # Uncomment the below if you already have an errorLogs table in dynamoDB
    # (Note) Need to document errorLogs some day
    - Effect: "Allow"
      Action:
        - "dynamodb:DescribeTable"
        - "dynamodb:PutItem"
        - "dynamodb:UpdateItem"
        - "dynamodb:Query"
        - "dynamodb:Scan"
      Resource:
        - 'Fn::Join':
          - ':'
          -
            - 'arn:aws:dynamodb:us-west-2'
            - Ref: 'AWS::AccountId'
            - 'table/errorLogs'

# Define Lambda functions
functions:
  # Deployer function
  deployer:
    handler: src/handler.deployer
    description: Lambda bot triggered by Github webhook to APIG to deploy to S3
    environment:
      github_token: ${self:custom.github_personal_access_token}
    events:
      - http:
          path: ghWebhook
          method: post
          cors: true
<commit_msg>Set lambda defaults for mem and timeout. Timeout currently exceeds limit in place by APIG<commit_after>
service: SLS-GithubToS3

custom:
  # Provide Github Personal Access Token here
  # https://github.com/settings/tokens
  github_personal_access_token: 148f1f333a5fc2d2624c9eddc8c788c07e149176

provider:
  name: aws
  runtime: nodejs8.10
  memorySize: 128
  timeout: 300
  # Stage name goes here (eg: dev/prod/v1)
  stage: v1
  # Make sure this matches the region you are using
  region: us-east-1

  iamRoleStatements:
    # Required to be able to sync files from the repo to the S3 bucket
    - Effect: "Allow"
      Action:
        - "s3:ListBucket"
        - "s3:GetBucketLocation"
        - "s3:PutObject"
        - "s3:GetObject"
        - "s3:DeleteObject"
      # List all S3 buckets this should have permissions to deploy to below
      Resource:
        - "arn:aws:s3:::www.cathymunz.com*"
        - "arn:aws:s3:::dev.cathymunz.com*"
        - "arn:aws:s3:::githubtos3.kylemunz.com*"
        - "arn:aws:s3:::githubtos3-dev.kylemunz.com*"
        - "arn:aws:s3:::www.kylemunz.com*"
        - "arn:aws:s3:::dev.kylemunz.com*"
    # Uncomment the below if you already have an errorLogs table in dynamoDB
    # (Note) Need to document errorLogs some day
    - Effect: "Allow"
      Action:
        - "dynamodb:DescribeTable"
        - "dynamodb:PutItem"
        - "dynamodb:UpdateItem"
        - "dynamodb:Query"
        - "dynamodb:Scan"
      Resource:
        - 'Fn::Join':
          - ':'
          -
            - 'arn:aws:dynamodb:us-west-2'
            - Ref: 'AWS::AccountId'
            - 'table/errorLogs'

# Define Lambda functions
functions:
  # Deployer function
  deployer:
    handler: src/handler.deployer
    description: Lambda bot triggered by Github webhook to APIG to deploy to S3
    environment:
      github_token: ${self:custom.github_personal_access_token}
    events:
      - http:
          path: ghWebhook
          method: post
          cors: true

{'fraction_non_alphanumeric': 0.10873533246414602, 'fraction_numerical': 0.020860495436766623, 'mean_word_length': 2.329861111111111, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 2, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2431661', 'n_tokens_mistral': 1352, 'n_tokens_neox': 1311, 'n_words': 308}