-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
107 lines (103 loc) · 2.66 KB
/
template.yaml
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
# @Author: Brogan Miner <Brogan>
# @Date: 2019-05-05T17:45:07-07:00
# @Email: [email protected]
# @Last modified by: Brogan
# @Last modified time: 2019-05-07T20:05:06-07:00
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: DB access wrappers for OSU Sustainability Office
Metadata:
AWS::ServerlessRepo::Application:
Name: OSUSORootApp
Description: Root application for OSU SO Nested Stack
Author: Brogan Miner
HomePageUrl: https://github.com/OSU-Sustainability-Office/lambda-common-layer
SemanticVersion: 1.0.1 # Refer to here for semantic versioning: https://semver.org/
Globals:
Function:
Timeout: 3
Runtime: nodejs20.x
Api:
Cors:
AllowMethods: "'POST, GET'"
AllowHeaders: "'X-Forwarded-For'"
AllowOrigin: "'oregonstate.edu'"
MaxAge: "'600'"
AllowCredentials: True
Resources:
AuthLogin:
Type: AWS::Serverless::Function
Properties:
MemorySize: 128
CodeUri: Auth/
Handler: app.login
Layers:
- !Ref LambdaCommonLayer
Events:
Login:
Type: Api
Properties:
Path: /login
Method: get
AuthUser:
Type: AWS::Serverless::Function
Properties:
MemorySize: 128
CodeUri: Auth/
Handler: app.checkCookie
Layers:
- !Ref LambdaCommonLayer
Events:
Login:
Type: Api
Properties:
Path: /user
Method: get
AuthLogout:
Type: AWS::Serverless::Function
Properties:
MemorySize: 128
Policies:
- AmazonDynamoDBFullAccess
CodeUri: Auth/
Handler: app.logout
Layers:
- !Ref LambdaCommonLayer
Events:
Login:
Type: Api
Properties:
Path: /logout
Method: get
AuthSession:
Type: AWS::Serverless::Function
Properties:
MemorySize: 128
Policies:
- AmazonDynamoDBFullAccess
CodeUri: Auth/
Handler: app.session
Layers:
- !Ref LambdaCommonLayer
Events:
Login:
Type: Api
Properties:
Path: /session
Method: get
LambdaCommonLayer:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: LambdaCommonLayer
Description: common layer
ContentUri: dependencies/
CompatibleRuntimes:
- nodejs6.10
- nodejs8.10
- nodejs10.x
- nodejs12.x
- nodejs16.x
- nodejs18.x
- nodejs20.x
LicenseInfo: 'MIT'
RetentionPolicy: Retain