forked from awslabs/aws-lambda-web-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
61 lines (57 loc) · 1.54 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
61
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
serverless-php-demo
Sample SAM Template for serverless-php-demo
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 10
Resources:
ApiGatewayApi:
Type: AWS::Serverless::Api
Properties:
EndpointConfiguration:
Type: REGIONAL
StageName: Prod
TracingEnabled: True
BinaryMediaTypes:
- '*~1*'
Function:
Type: AWS::Serverless::Function
Properties:
Architectures:
- x86_64
PackageType: Image
MemorySize: 1024
Tracing: Active
Policies:
- CloudWatchLambdaInsightsExecutionRolePolicy # Add IAM Permission for Lambda Insight Extension
Environment:
Variables:
RUST_LOG: debug
PORT: 8080
Events:
Root:
Type: Api
Properties:
RestApiId: !Ref ApiGatewayApi
Path: /
Method: ANY
Proxy:
Type: Api
Properties:
RestApiId: !Ref ApiGatewayApi
Path: /{proxy+}
Method: ANY
Metadata:
DockerTag: v1
DockerContext: ./
Dockerfile: Dockerfile
Outputs:
URL:
Description: "API Gateway endpoint URL for Prod stage for PHP application"
Value: !Sub "https://${ApiGatewayApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/Prod/"
Function:
Description: "Lambda Function ARN"
Value: !GetAtt Function.Arn