-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
118 lines (107 loc) · 2.96 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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
service: community-graphacademy
useDotenv: true
provider:
name: aws
runtime: python3.8
timeout: 29
memorySize: 2048
stage: ${opt:stage, 'dev'}
environment:
DEPLOY_STAGE: ${self:provider.stage}
NEO4J_HOST: ${env:NEO4J_HOST}
NEO4J_USER: ${env:NEO4J_USER}
NEO4J_PASS: ${env:NEO4J_PASS}
iam:
role:
statements: # permissions for all of your functions can be set here
- Effect: Allow
Action:
- s3:ListBucket
- s3:PutObject
Resource: "arn:aws:s3:::graphacademy.neo4j.com/*"
lambdaHashingVersion: "20201221"
httpApi:
cors:
origins:
- "*"
authorizers:
serviceAuthorizer:
identitySource: $request.header.Authorization
issuerUrl: ${env:AUTH0_DOMAIN}
audience:
- ${env:AUTH0_AUDIENCE}
- neo4j://accountinfo/
- https://neo4j-sync.auth0.com/userinfo
plugins:
- serverless-python-requirements
- serverless-offline
functions:
set-quiz-status:
handler: handler.set_quiz_status
role: 'arn:aws:iam::715633473519:role/lambda_graphacademy'
events:
- httpApi:
method: POST
path: /setQuizStatus
authorizer: serviceAuthorizer
get-quiz-status:
handler: handler.get_quiz_status
role: 'arn:aws:iam::715633473519:role/lambda_graphacademy'
events:
- httpApi:
method: GET
path: /getQuizStatus
authorizer: serviceAuthorizer
send-emails:
handler: handler.send_emails
role: 'arn:aws:iam::715633473519:role/lambda_graphacademy'
events:
- schedule: rate(1 minute)
log-training-view:
handler: handler.log_training_view
role: 'arn:aws:iam::715633473519:role/lambda_graphacademy'
events:
- httpApi:
method: POST
path: /logTrainingView
authorizer: serviceAuthorizer
set-class-enrollment:
handler: handler.set_class_enrollment
role: 'arn:aws:iam::715633473519:role/lambda_graphacademy'
events:
- httpApi:
method: POST
path: /setClassEnrollment
authorizer: serviceAuthorizer
gen-class-certificate:
handler: handler.gen_class_certificate
role: 'arn:aws:iam::715633473519:role/lambda_graphacademy'
events:
- httpApi:
method: POST
path: /genClassCertificate
authorizer: serviceAuthorizer
get-class-enrollment:
handler: handler.get_class_enrollment
role: 'arn:aws:iam::715633473519:role/lambda_graphacademy'
events:
- httpApi:
method: GET
path: /getClassEnrollment
authorizer: serviceAuthorizer
get-print-form:
handler: print.get_print_form
role: 'arn:aws:iam::715633473519:role/lambda_graphacademy'
events:
- httpApi:
method: GET
path: /getPrintForm
authorizer: serviceAuthorizer
package:
patterns:
- "!node_modules/**"
- "!a/**"
- "!venv/**"
custom:
pythonRequirements:
dockerizePip: true