-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackaged.yaml
176 lines (174 loc) · 4.71 KB
/
packaged.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
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: 'unicode_exam_api
Sample SAM Template for unicode_exam_api
'
Globals:
Function:
Timeout: 60
MemorySize: 128
LoggingConfig:
LogFormat: JSON
Resources:
UnicodeTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: Unicode
AttributeDefinitions:
- AttributeName: char
AttributeType: S
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
KeySchema:
- AttributeName: char
KeyType: HASH
Metadata:
SamResourceId: UnicodeTable
ApplicationsTable:
Type: AWS::DynamoDB::Table
Properties:
TableName: Applications
AttributeDefinitions:
- AttributeName: user_id
AttributeType: S
- AttributeName: appid
AttributeType: S
KeySchema:
- AttributeName: user_id
KeyType: HASH
- AttributeName: appid
KeyType: RANGE
ProvisionedThroughput:
ReadCapacityUnits: 1
WriteCapacityUnits: 1
Metadata:
SamResourceId: ApplicationsTable
CreateApplicationFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://serverlessadminbucket/d1aeb9467b408aa507bb0d6ef8ebc0f0
Handler: app.lambda_handler
Runtime: python3.8
Policies:
- DynamoDBCrudPolicy:
TableName:
Ref: ApplicationsTable
Events:
CreateApplication:
Type: Api
Properties:
Path: /api/v1/application
Method: post
Metadata:
SamResourceId: CreateApplicationFunction
GetApplicationsFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://serverlessadminbucket/048476faa46f6ad6fb1b4203aa227b1c
Handler: app.lambda_handler
Runtime: python3.8
Policies:
- DynamoDBCrudPolicy:
TableName:
Ref: ApplicationsTable
Events:
GetApplications:
Type: Api
Properties:
Path: /api/v1/saved/
Method: get
Metadata:
SamResourceId: GetApplicationsFunction
EditApplicationFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://serverlessadminbucket/4a939ec183a815a0679a99a1d16d1641
Handler: app.lambda_handler
Runtime: python3.8
Policies:
- DynamoDBCrudPolicy:
TableName:
Ref: ApplicationsTable
Events:
EditApplication:
Type: Api
Properties:
Path: /api/v1/application/{applicationid}
Method: put
Metadata:
SamResourceId: EditApplicationFunction
GetApplicationFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://serverlessadminbucket/422b6dd35ed6fcbfc565aa94eac64098
Handler: app.lambda_handler
Runtime: python3.8
Policies:
- DynamoDBReadPolicy:
TableName:
Ref: ApplicationsTable
Events:
GetApplication:
Type: Api
Properties:
Path: /api/v1/application/{applicationid}
Method: get
Metadata:
SamResourceId: GetApplicationFunction
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://serverlessadminbucket/66a43403ed45e1ba3894d25fc108a14e
Handler: app.lambda_handler
Runtime: python3.8
Architectures:
- x86_64
Events:
HelloWorld:
Type: Api
Properties:
Path: /hello
Method: get
Metadata:
SamResourceId: HelloWorldFunction
DeleteApplicationFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: s3://serverlessadminbucket/0061d84decadae055d15be230921fe91
Handler: app.lambda_handler
Runtime: python3.8
Policies:
- DynamoDBCrudPolicy:
TableName:
Ref: ApplicationsTable
Events:
DeleteApplication:
Type: Api
Properties:
Path: /api/v1/application/{applicationid}
Method: delete
Metadata:
SamResourceId: DeleteApplicationFunction
UnicodeInfoFunction:
Metadata:
BuildMethod: python3.8
BuildCommand: pip install -r requirements.txt -t get_char_info/
SamResourceId: UnicodeInfoFunction
Type: AWS::Serverless::Function
Properties:
Policies:
- DynamoDBCrudPolicy:
TableName:
Ref: UnicodeTable
CodeUri: s3://serverlessadminbucket/d454609381a3ac47b49e529625ecd445
Handler: app.lambda_handler
Runtime: python3.8
Architectures:
- x86_64
Events:
UnicodeInfo:
Type: Api
Properties:
Path: /api/v1/unicode/{char}
Method: get