-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yml
65 lines (64 loc) · 1.83 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
61
62
63
64
65
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: An AWS Serverless Application Model template describing your function.
Parameters:
Environment:
Type: String
Description: The deployment environment
AllowedValues:
- live
- test
LambdaTimeout:
Default: '30'
Type: Number
Description: >-
The function execution time (in seconds) after which Lambda terminates the
function.
LambdaMemorySize:
Default: '128'
Type: Number
Description: 'The amount of memory, in MB, that is allocated to your Lambda function.'
Resources:
saveasruns:
Type: AWS::Serverless::Function
FunctionName: !Sub ${Environment}-saveasruns
Properties:
InlineCode: |
def lambda_handler(event, context):
pass
Description: ''
MemorySize: 128
Timeout: 300
Handler: index.lambda_handler
Runtime: python3.12
Architectures:
- arm64
EphemeralStorage:
Size: 512
EventInvokeConfig:
MaximumEventAgeInSeconds: 21600
MaximumRetryAttempts: 2
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:336392948345:layer:AWSSDKPandas-Python312-Arm64:15
PackageType: Zip
Policies:
- S3CrudPolicy:
BucketName: iplayer-dazzler-asruns
- FilterLogEventsPolicy:
LogGroupName: ElementalMediaLive
- Statement:
- Action: medialive:ListChannels
Effect: Allow
Resource: "*"
RecursiveLoop: Terminate
Events:
Schedule1:
Type: Schedule
Properties:
Schedule: cron(5 0 ? * * *)
AliasForLambda:
Type: 'AWS::Lambda::Alias'
Properties:
FunctionVersion: $LATEST
FunctionName: !Ref saveasruns
Name: !Ref Environment