forked from ilios/lti-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
80 lines (74 loc) · 2.29 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
service: ilios-lti-launch
custom:
ltiDashboard-dev: 'https://dev-lti-dashboard.iliosproject.org'
ltiDashboard-prod: 'https://lti-dashboard.iliosproject.org'
ltiCourseManager-dev: 'https://dev-lti-course-manager.iliosproject.org'
ltiCourseManager-prod: 'https://lti-course-manager.iliosproject.org'
additionalStacks:
permanent:
Resources:
S3BucketData:
Type: AWS::S3::Bucket
Properties:
BucketName: ${self:provider.environment.CONFIG_BUCKET}
AccessControl: Private
DeletionPolicy : Retain
plugins:
- serverless-plugin-additional-stacks
provider:
name: aws
runtime: nodejs20.x
memorySize: 128
timeout: 5
stage: dev
region: us-west-2
versionFunctions: false
stackTags:
Tag1 : lti
Tag2 : lti-launch
iamRoleStatements:
- Effect: "Allow"
Action:
- "s3:*"
Resource: "arn:aws:s3:::${self:provider.environment.CONFIG_BUCKET}/*"
- Effect: "Allow"
Action:
- "sdb:*"
Resource: "arn:aws:sdb:${self:provider.region}:*:domain/${self:service}-${opt:stage, self:provider.stage}-LTILaunchUserSimpleDB-*"
environment:
DASHBOARD_APP_URL: ${self:custom.ltiDashboard-${opt:stage, self:provider.stage}}
COURSE_MANAGER_APP_URL: ${self:custom.ltiCourseManager-${opt:stage, self:provider.stage}}
USERID_SIMPLEDB_DOMAIN:
Ref: LTILaunchUserSimpleDB
CONFIG_BUCKET: 'ilios-lti-launch-configuration-${opt:stage, self:provider.stage}'
functions:
dashboard:
description: Launches the ilios-lti application dashboard
handler: handler.dashboard
events:
- http:
path: dashboard
method: post
integration: lambda-proxy
courseManager:
description: Launches the ilios-lti course manager
handler: handler.courseManager
events:
- http:
path: course-manager
method: post
integration: lambda-proxy
payload:
description: Displays LTI payload data from POST request to the user
handler: handler.payload
events:
- http:
path: payload
method: post
integration: lambda-proxy
resources:
Resources:
LTILaunchUserSimpleDB:
Type: "AWS::SDB::Domain"
Properties:
Description: LaunchLTI SimpleDB for caching userId values