service: serverless-spam-slayer
frameworkVersion: '3'
provider:
  name: aws
  region: us-east-2
  runtime: nodejs14.x
  environment:
    SLACK_SIGNING_SECRET: ${self:custom.slacksecrets.SLACK_SIGNING_SECRET}
    SLACK_BOT_TOKEN: ${self:custom.slacksecrets.SLACK_BOT_TOKEN}
    CLICKS_MONITORING: ${self:custom.slacksecrets.SLACK_CHANNEL_CLICKS_MONITORING}
    HACKATHON_CHANNEL: ${self:custom.slacksecrets.SLACK_CHANNEL_HACKATHON_CHANNEL}
    TRACTION_DOMAIN: 'https://traction.technologyadvice.com'
    TRACTION_API_KEY: ${self:custom.slacksecrets.TRACTION_API_KEY}
functions:
  slack:
    handler: src/app.handler
    events:
      - http:
          path: slack/events
          method: post
custom:
  slacksecrets: ${ssm:/aws/reference/secretsmanager/spamslayer/prod/env}
plugins:
  - serverless-offline