forked from aws-samples/aws-lambda-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
48 lines (42 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
AWSTemplateFormatVersion: 2010-09-09
Transform: AWS::Serverless-2016-10-31
Description: >
python-example-logs-api-extension
Sample SAM Template for python-example-logs-api-extension
Globals:
Function:
Timeout: 5
Resources:
PythonExampleLogsApiExtensionLayer:
Type: AWS::Serverless::LayerVersion
Metadata:
BuildMethod: makefile
Properties:
LayerName: python-example-logs-api-extension
Description: Python Example Logs API Lambda Extension Layer
ContentUri: .
CompatibleRuntimes:
- python3.8
LicenseInfo: MIT-0
RetentionPolicy: Delete
HelloWorldFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: python-example-logs-api-extension-demo-function
CodeUri: hello-world/
Handler: lambda_function.lambda_handler
MemorySize: 128
Timeout: 100
Runtime: python3.8
Layers:
- !Ref PythonExampleLogsApiExtensionLayer
Outputs:
PythonExampleLogsApiExtensionLayer:
Description: Python Example Lambda Extension Layer Version ARN
Value: !Ref PythonExampleLogsApiExtensionLayer
HelloWorldFunction:
Description: First Lambda Function ARN
Value: !GetAtt HelloWorldFunction.Arn
HelloWorldFunctionIamRole:
Description: Implicit IAM Role created for Hello World function
Value: !GetAtt HelloWorldFunctionRole.Arn