-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathtemplate.yml
43 lines (43 loc) · 1.02 KB
/
template.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
AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31
Description: React TodoMVC with a Serverless backend
Globals:
Api:
BinaryMediaTypes:
# The ~1 will be replaced with / when deployed
- '*~1*'
Resources:
siteFunction:
Type: AWS::Serverless::Function
Properties:
Description: React TodoMVC with a Serverless backend
Handler: bundle.handler
Runtime: nodejs20.x
CodeUri: todo.zip
Policies:
- DynamoDBCrudPolicy:
TableName:
Ref: todoTable
Timeout: 10
Events:
root:
Type: Api
Properties:
Path: /
Method: get
getProxy:
Type: Api
Properties:
Path: '/{proxy+}'
Method: get
postProxy:
Type: Api
Properties:
Path: '/{proxy+}'
Method: post
Environment:
Variables:
TABLE:
Ref: todoTable
todoTable:
Type: AWS::Serverless::SimpleTable