service: ringcentral-add-in-test-bot-service
plugins:
  - serverless-plugin-log-retention
custom:
  logRetentionInDays: 180 # used to set a global value for all functions
provider:
  stage: ${opt:stage, 'prod'}
  name: aws
  runtime: nodejs14.x
  region: us-east-1
  memorySize: 256
  environment: ${file(./env.yml)}
  profile: default
  # iamRoleStatements:
  #   - Effect: Allow
  #     Action:
  #       - lambda:InvokeFunction
  #     Resource: ""
  tags:
    Department: 
    Owner: 
    Stage: 
    Environment: 
    Team: 
    Name: 
package:
  excludeDevDependencies: true
  patterns:
    - '.json'
    - '.js'
    - 'node_modules/**'
functions:
  app:
    handler: lambda.app
    # role: arn:aws:iam::111111:role/xxxx-prod-us-east-1-lambdaRole
    events:
      - http:
          method: any
          path: /{proxy+}
          cors: false
resources:
  Resources:
    botTable:
      Type: AWS::DynamoDB::Table
      Properties:
        TableName: ringcentral-add-in-test-bot-bot
        AttributeDefinitions:
          - AttributeName: id
            AttributeType: S
        KeySchema:
          - AttributeName: id
            KeyType: HASH
        ProvisionedThroughput:
          ReadCapacityUnits: 1
          WriteCapacityUnits: 1
    testTable:
      Type: AWS::DynamoDB::Table
      Properties:
        TableName: ringcentral-add-in-test-bot-test
        AttributeDefinitions:
          - AttributeName: id
            AttributeType: S
        KeySchema:
          - AttributeName: id
            KeyType: HASH
        ProvisionedThroughput:
          ReadCapacityUnits: 1
          WriteCapacityUnits: 1