-
Notifications
You must be signed in to change notification settings - Fork 6
/
serverless.yml
34 lines (29 loc) · 1.17 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
service: fb-notification-service # Name of the service
useDotenv: true # We want to get the env variables from our .env
provider:
name: aws # provider we want to use
runtime: python3.8 # runtime we want to use // python3.9 does not work currently
memorySize: 128 # memory size, 128 is the lowest, scales performance
region: eu-central-1
stage: ${opt:stage, 'production'} # is used in the name
lambdaHashingVersion: 20201221 # not stricly necessary, but helps identifying lamdas
environment: # here we need to make the .env variables available to our project
EMAIL: ${env:EMAIL}
EMAIL_PASSWORD: ${env:EMAIL_PASSWORD}
SMTP_SERVER: ${env:SMTP_SERVER}
TWILIO_NUMBER: ${env:TWILIO_NUMBER}
TWILIO_SID: ${env:TWILIO_SID}
TWILIO_AUTH: ${env:TWILIO_AUTH}
SLACK_WEBHOOK: ${env:SLACK_WEBHOOK}
# We need the following part to inject our python requirements
custom:
pythonRequirements:
dockerizePip: non-linux
plugins:
- serverless-python-requirements
# configures function execution
functions:
run: # name of the lambda function
handler: handler.run # function to be called ~ handler.py -> run()
events:
- schedule: rate(60 minutes) # frequency