-
Notifications
You must be signed in to change notification settings - Fork 22
/
template.yaml
56 lines (52 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
49
50
51
52
53
54
55
56
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Parameters:
LogLevel:
Type: String
AllowedValues:
- DEBUG
- INFO
- WARNING
Default: WARNING
RedisAddress:
Type: String
Default: redis/13
MemorySize:
Type: Number
Default: 1024
Timeout:
Type: Number
Default: 900
Globals:
Function:
Handler: app.lambda_handler
Runtime: python3.9
MemorySize: !Ref MemorySize
Timeout: !Ref Timeout
EventInvokeConfig:
MaximumRetryAttempts: 0
VpcConfig:
SecurityGroupIds:
- sg-0c15eb3bae6647d91
SubnetIds:
- subnet-064fe19cf24399bf4
- subnet-037dc2c4a90f16ddb
Architectures:
- x86_64
Resources:
MPContribsMakeDownloadFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: make_download/
Environment:
Variables:
MPCONTRIBS_CLIENT_LOG_LEVEL: !Ref LogLevel
REDIS_ADDRESS: !Ref RedisAddress
LAMBDA_TIMEOUT: !Ref Timeout
Outputs:
MPContribsMakeDownloadFunction:
Description: "MPContribsMakeDownloadFunction Lambda Function ARN"
Value: !GetAtt MPContribsMakeDownloadFunction.Arn
MPContribsMakeDownloadFunctionIamRole:
Description: "Implicit IAM Role created for MPContribsMakeDownloadFunction"
Value: !GetAtt MPContribsMakeDownloadFunctionRole.Arn