forked from brefphp/bref
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
60 lines (55 loc) · 1.94 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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: 'Bref demo'
Globals:
Function:
Timeout: 10
Resources:
SimpleFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: 'bref-demo-function'
Description: 'Bref CLI demo'
CodeUri: .
Handler: demo/function.php
Runtime: provided
Layers:
- 'arn:aws:lambda:us-east-2:209497400698:layer:php-72:4'
HttpFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: 'bref-demo-http'
Description: 'Bref HTTP demo'
CodeUri: .
Handler: demo/http.php
Timeout: 5 # in seconds (API Gateway has a timeout of 30 seconds)
MemorySize: 1024 # The memory size is related to the pricing and CPU power
Runtime: provided
Layers:
- 'arn:aws:lambda:us-east-2:209497400698:layer:php-72-fpm:4'
Events:
HttpRoot:
Type: Api
Properties:
Path: /
Method: ANY
HttpSubPaths:
Type: Api
Properties:
Path: /{proxy+}
Method: ANY
ConsoleFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: 'bref-demo-console'
Description: 'Bref console command demo'
CodeUri: .
Handler: demo/console.php
Runtime: provided
Layers:
- 'arn:aws:lambda:us-east-2:209497400698:layer:php-72:4'
- 'arn:aws:lambda:us-east-2:209497400698:layer:console:4'
Outputs:
DemoHttpApi:
Description: 'API Gateway URL for our function'
Value: !Sub 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/'