-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
61 lines (55 loc) · 1.39 KB
/
serverless.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
service: slack-notion-bot
frameworkVersion: "3"
provider:
name: aws
runtime: nodejs18.x
stage: ${opt:stage, 'dev'}
region: ap-northeast-2
deploymentMethod: direct
environment:
SLACK_BOT_TOKEN: ${env:SLACK_BOT_TOKEN}
SLACK_SIGNING_SECRET: ${env:SLACK_SIGNING_SECRET}
NOTION_DATABASE_ID: ${env:NOTION_DATABASE_ID}
NOTION_TOKEN: ${env:NOTION_TOKEN}
TEAM_JOON_CHANNEL: ${env:TEAM_JOON_CHANNEL}
DEBUG_CHANNEL: ${env:DEBUG_CHANNEL}
functions:
slackBotHandler:
handler: dist/utils/function/lambdaHandler/handler.handler
timeout: 15
events:
- httpApi:
method: POST
path: /slack/events
- httpApi:
method: POST
path: /slack/command
- httpApi:
method: POST
path: /slack/uploadNotion
- schedule:
rate: rate(30 minutes)
enabled: true
input:
detail-type: "ScheduledEvent"
source: "aws.events"
detail: {}
SendBlogInfoToSlackSchedule:
handler: dist/scheduler/sendBlogInfoToSlackChannel.handler
timeout: 20
events:
- schedule:
rate: cron(0 0 ? * 2 *)
plugins:
- serverless-offline
- serverless-domain-manager
useDotenv: true
custom:
customDomain:
domainName: slack.team-joon.com
basePath: ''
stage: $default
createRoute53Record: false
endpointType: 'regional'
securityPolicy: tls_1_2
apiType: http