-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserverless.yml
32 lines (32 loc) · 944 Bytes
/
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
service: SlackChannelArchiver
provider:
name: aws
timeout: 90 # seconds
runtime: python3.6
stage: ${opt:stage, self:custom.defaultStage}
region: ${opt:region, self:custom.defaultRegion}
profile: ${opt:profile, self:custom.defaultProfile}
custom:
defaultStage: dev
defaultRegion: ap-northeast-1
defaultProfile: default
otherfile:
environment:
dev: ${file(./environment_dev.yml)}
prd: ${file(./environment_prd.yml)}
alerts: # alert plugin
stages:
- ${opt:stage, self:custom.defaultStage}
alarms:
- functionErrors
- functionThrottles
functions:
fnc:
handler: main.handler
events:
- schedule: cron(0 3 ? * MON *) # Invoke at UTC3:00(JST12:00) the first Monday of every week
## cron(0 3 * * ? *) # Invoke at UTC3:00(JST12:00) every day
environment:
${self:custom.otherfile.environment.${self:provider.stage}}
plugins:
- serverless-plugin-aws-alerts