-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
49 lines (42 loc) · 999 Bytes
/
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
org: ayanguha
app: o365-reader
service: o365-reader
frameworkVersion: '2'
provider:
name: aws
runtime: python3.8
lambdaHashingVersion: 20201221
stage: dev
region: ap-southeast-2
memorySize: 512
timeout: 60
profile: ${self:custom.profiles.${sls:stage}}
environment:
S3_BUCKET: o365-reader
S3_TOKEN_FILENAME: token/o365_token.txt
S3_DATA_FOLDER: inbound/
APP_ID: your_app_id
SECRET: your_app_secret
TENAND_ID: your_app_tenant_id
RESOURCE: your_email
iam:
role:
managedPolicies:
- "arn:aws:iam::aws:policy/AmazonS3FullAccess"
plugins:
- serverless-python-requirements
functions:
rateHandler:
handler: handler.run
events:
# Invoke Lambda function every minute
- schedule: rate(1 minute)
cronHandler:
handler: handler.run
events:
# Invoke Lambda function every 20 minute from Mon-Fri
- schedule: cron(0/2 * ? * MON-FRI *)
custom:
profiles:
dev: o365-reader
prod: o365-reader