-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathtemplate.yml
41 lines (39 loc) · 913 Bytes
/
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
AWSTemplateFormatVersion: 2010-09-09
Transform:
- AWS::Serverless-2016-10-31
- AWS::CodeStar
Parameters:
ProjectId:
Type: String
Description: Stu - Serverless Teeny Url
Resources:
siteFunction:
Type: AWS::Serverless::Function
Properties:
Handler: index.handler
Runtime: nodejs10.x
Role:
Fn::ImportValue:
!Join ['-', [!Ref 'ProjectId', !Ref 'AWS::Region', 'LambdaTrustRole']]
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:
URL_TABLE:
Ref: urlTable
urlTable:
Type: AWS::Serverless::SimpleTable