-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
59 lines (54 loc) · 1.12 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
service: vbot
custom:
# Service name
service: ${self:service}
# Stage
stage: ${opt:stage, 'dev'}
# serverless-python-requirements plugin (package dependencies)
pythonRequirements:
dockerizePip: true
zip: true
slim: true
# serverless-prune-plugin (prune old deployments)
prune:
automatic: true
number: 10
package:
individually: false
exclude:
- '**/*'
include:
- handler.py
provider:
name: aws
profile: vbot
runtime: python3.7
memorySize: 128
stackTags:
PROJECT: VBot
iamRoleStatements:
- Sid: AllowAccessToOwnSSMParameters
Effect: Allow
Action:
- ssm:Get*
Resource: arn:aws:ssm:*:*:parameter/${self:custom.service}/*
environment:
SERVICE_NAME: ${self:custom.service}
functions:
slack:
handler: handler.slack
events:
- schedule: rate(15 minutes)
- http:
path: slack
method: post
travis:
handler: handler.travis
events:
- schedule: rate(15 minutes)
- http:
path: travis
method: post
plugins:
- serverless-python-requirements
- serverless-prune-plugin