-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
52 lines (48 loc) · 1.04 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
service: vacunacovid-telegrambot
plugins:
- serverless-python-requirements
- serverless-plugin-aws-alerts
custom:
pythonRequirements:
dockerizePip: non-linux
alerts:
stages:
- pro
topics:
alarm:
topic: ${self:service}-${opt:stage}-alerts-alarm
notifications:
- protocol: email
endpoint: ${env:NOTIFICATIONS_EMAIL}
alarms:
- functionErrors
definitions:
functionErrors:
treatMissingData: notBreaching
provider:
name: aws
runtime: python3.7
stage: dev
timeout: 15
region: eu-west-1
logRetentionInDays: 7
iamRoleStatements:
- Effect: Allow
Action:
- dynamodb:Query
- dynamodb:Scan
- dynamodb:GetItem
- dynamodb:PutItem
- dynamodb:UpdateItem
- dynamodb:DeleteItem
- ssm:GetParameter
Resource:
- "*"
environment:
BOT_TOKEN: ${env:BOT_TOKEN}
STAGE: ${opt:stage}
functions:
message_handler:
handler: main.handle_telegram_message
timeout: 30
url: true