-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
38 lines (37 loc) · 996 Bytes
/
serverless.yml
File metadata and controls
38 lines (37 loc) · 996 Bytes
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
# Please change the service name to your preferences
service: my-email-telegram
plugins:
- serverless-dotenv-plugin
- serverless-python-requirements
provider:
# aws by default
name: aws
runtime: python3.8
stage: dev
region: ap-southeast-1
iamRoleStatements:
- Effect: Allow
Action:
- s3:*
Resource: "arn:aws:s3:::${env:BUCKETNAME}/*"
- Effect: Allow
Action:
- s3:*
Resource: "arn:aws:s3:::${env:BUCKETNAME}"
environment: # bash command `export <THE ENV VAR>`
EMAIL: ${env:EMAIL}
PASSWORD: ${env:PASSWORD}
SERVER: ${env:SERVER}
MAX_DEPTH: ${env:MAX_DEPTH}
API_KEY: ${env:API_KEY}
CHAT_ID: ${env:CHAT_ID}
LAST_ID: ${env:LAST_ID}
CHANNEL_NAME: ${env:CHANNEL_NAME}
functions:
telegram_bot:
handler: handler.telegram_bot
events:
- http:
path: check # Path to call this function, can change to other path
method: post # Can change to GET as well
cors: true