-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
48 lines (43 loc) · 1.19 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
service: createslackchannel
provider:
name: aws
runtime: python3.7
# stage: dev #for test
stage: prod
region: ap-northeast-1
deploymentBucket: ${file(./myCustomFile.yml):deployment_bucket}
logRetentionInDays: 7
timeout: 30
memorySize: 128
environment:
TZ: Asia/Tokyo
SLACK_API_TOKEN: ${file(./myCustomFile.yml):slack_token}
# POST_CHANNEL: ${file(./myCustomFile.yml):post_channel_dev} # for test
POST_CHANNEL: ${file(./myCustomFile.yml):post_channel_prod}
# EXEC_USER_ID: ${file(./myCustomFile.yml):exec_user_id_dev} # for test
EXEC_USER_ID: ${file(./myCustomFile.yml):exec_user_id_prod}
package:
exclude:
- dist/**
- myCustomFile.yml
- node_modules/**
plugins:
- serverless-prune-plugin
- serverless-plugin-aws-alerts
- serverless-python-requirements
functions:
main:
handler: src/main.handler
timeout: 600
events:
# - schedule:
# rate: cron(50 * * * ? *) #for test
# rate: cron(00 2 1 * ? *)
- http:
path: createAndArchive
method: post
async: true
response:
headers:
Content-Type: "'application/json'"
custom: ${file(./myCustomFile.yml)}