forked from aws-powertools/powertools-lambda-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
48 lines (42 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
48
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Globals:
Function:
Handler: main.handler
Runtime: python3.8
MemorySize: 128
Tracing: Active
Environment:
Variables:
POWERTOOLS_SERVICE_NAME: benchmark
POWERTOOLS_METRICS_NAMESPACE: LambdaPowertools
POWERTOOLS_LOGGER_LOG_EVENT: "true"
POWERTOOLS_LOG_LEVEL: INFO
Resources:
InstrumentedFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: ./src/instrumented/
ReferenceFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: ./src/reference/
InstrumentedLogGroup:
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: !Sub "/aws/lambda/${InstrumentedFunction}"
RetentionInDays: 7
ReferenceLogGroup:
Type: AWS::Logs::LogGroup
Properties:
LogGroupName: !Sub "/aws/lambda/${ReferenceFunction}"
RetentionInDays: 7
Outputs:
InstrumentedFunction:
Value: !Ref InstrumentedFunction
ReferenceFunction:
Value: !Ref ReferenceFunction
InstrumentedLogGroup:
Value: !Ref InstrumentedLogGroup
ReferenceLogGroup:
Value: !Ref ReferenceLogGroup