-
Notifications
You must be signed in to change notification settings - Fork 115
/
template.yaml
48 lines (43 loc) · 1.15 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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: >
sam-app
Sample SAM Template for sam-app
Globals:
Function:
Timeout: 10
Resources:
PetstoreFunction:
Type: AWS::Serverless::Function
Properties:
MemorySize: 512
Handler: run.sh
CodeUri: app/
Runtime: java17
AutoPublishAlias: live
SnapStart:
ApplyOn: PublishedVersions
Environment:
Variables:
PORT: 8000
RUST_LOG: info
READINESS_CHECK_PATH: /healthz
REMOVE_BASE_PATH: /v1
AWS_LAMBDA_EXEC_WRAPPER: /opt/bootstrap
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerX86:23
Events:
Root:
Type: HttpApi
Properties:
Path: /v1
Method: ANY
Petstore:
Type: HttpApi
Properties:
Path: /v1/{proxy+}
Method: ANY
Outputs:
PetstoreApi:
Description: "API Gateway endpoint URL for Prod stage for Petstore function"
Value: !Sub "https://${ServerlessHttpApi}.execute-api.${AWS::Region}.${AWS::URLSuffix}/v1/pets"