forked from aws-samples/aws-lambda-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yml
60 lines (60 loc) · 2.29 KB
/
template.yml
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
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Lambda Custom Runtime Extension Demo
##########################################################################
# Parameters & Globals #
##########################################################################
Globals:
Function:
Tracing: Active
Tags:
Application: CustomRuntimeExtensionDemo
Resources:
##########################################################################
# Lambda functions #
##########################################################################
Function:
Type: AWS::Serverless::Function
Properties:
FunctionName: custom-runtime-extension-demo-function
Description: Extension Demo Function
CodeUri: functionsrc/
Runtime: provided.al2
Handler: function.handler
MemorySize: 128
Timeout: 100
Layers:
- !Ref CustomRuntimeLayer
- !Ref ExtensionsLayer
##########################################################################
# Lambda layers #
##########################################################################
CustomRuntimeLayer:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: custom-runtime-layer
Description: Layer containing custom runtime and function code
ContentUri: runtime/
LicenseInfo: 'Available under the MIT-0 license.'
RetentionPolicy: Delete
ExtensionsLayer:
Type: AWS::Serverless::LayerVersion
Properties:
LayerName: extensions-layer
Description: Layer containing extension(s)
ContentUri: extensionssrc/
LicenseInfo: 'Available under the MIT-0 license.'
RetentionPolicy: Delete
##########################################################################
# OUTPUTS #
##########################################################################
Outputs:
CustomRuntimeLayer:
Value: !Ref CustomRuntimeLayer
Description: Custom Runtime Layer ARN
ExtensionsLayer:
Value: !Ref ExtensionsLayer
Description: Extension Layer ARN
Function:
Value: !Ref Function
Description: Lambda Function