forked from awslabs/aws-lambda-web-adapter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
52 lines (48 loc) · 1.35 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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
serverless-nginx-demo
Sample SAM Template for serverless-nginx-demo
# More info about Globals: https://github.com/awslabs/serverless-application-model/blob/master/docs/globals.rst
Globals:
Function:
Timeout: 29
Resources:
Function:
Type: AWS::Serverless::Function
Properties:
PackageType: Image
Architectures:
- x86_64
MemorySize: 1024
Policies:
- CloudWatchLambdaInsightsExecutionRolePolicy # Add IAM Permission for Lambda Insight Extension
Environment:
Variables:
RUST_LOG: debug
PORT: 8080
Events:
Root:
Type: HttpApi
Properties:
Path: /
Method: ANY
Petstore:
Type: HttpApi
Properties:
Path: /{proxy+}
Method: ANY
Metadata:
DockerTag: v1
DockerContext: .
Dockerfile: Dockerfile
Outputs:
URL:
Description: "API Gateway endpoint URL for Prod stage for Nginx application"
Value: !Sub "https://${ServerlessHttpApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/"
Function:
Description: "Lambda Function ARN"
Value: !GetAtt Function.Arn
FunctionRole:
Description: "Implicit IAM Role created for function"
Value: !GetAtt FunctionRole.Arn