-
Notifications
You must be signed in to change notification settings - Fork 21
/
template.yaml
35 lines (33 loc) · 1.16 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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: ''
Resources:
MyFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: 'php-grandmaster'
Description: ''
CodeUri: .
Handler: public/api.php
Timeout: 30 # in seconds (API Gateway has a timeout of 30 seconds)
MemorySize: 2048
Runtime: provided
Layers:
- 'arn:aws:lambda:us-east-1:209497400698:layer:php-73-fpm:1'
Events:
# The function will match all HTTP URLs
HttpRoot:
Type: Api
Properties:
Path: /
Method: ANY
HttpSubPaths:
Type: Api
Properties:
Path: /{proxy+}
Method: ANY
# Outputs show up in the CloudFormation dashboard
Outputs:
DemoHttpApi:
Description: 'URL of our function in the *Prod* environment'
Value: !Sub 'https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod/'