-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.yaml
More file actions
47 lines (43 loc) · 1.1 KB
/
template.yaml
File metadata and controls
47 lines (43 loc) · 1.1 KB
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: >
nodejs custom runtime
Parameters:
NodeVersion:
Type: String
Default: 12.16.1
Resources:
NodeRuntime:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: nodeRuntime
ContentUri: runtime
Description: !Sub 'Node runtime V${NodeVersion}'
LicenseInfo: MIT
RetentionPolicy: Retain
helloWorld:
Type: AWS::Serverless::Function
Properties:
CodeUri: ./helloWorld
MemorySize: 128
FunctionName: helloWorld
Handler: app.handler
Runtime: provided
Layers:
- !Ref NodeRuntime
Events:
ApiEvent:
Type: Api
Properties:
Path: /hello
Method: get
Metadata:
BuildMethod: makefile
Outputs:
DenoRuntimeARN:
Value: !Ref NodeRuntime
Export:
Name: nodeRuntimeARN
helloWorldApi:
Description: "API Gateway endpoint URL for Prod stage for Hello World function"
Value: !Sub "https://${ServerlessRestApi}.execute-api.${AWS::Region}.amazonaws.com/Prod"