-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.yaml
63 lines (57 loc) · 1.68 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
57
58
59
60
61
62
63
AWSTemplateFormatVersion: '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Combined SAM Template for AoM.GG Lambda Functions
Globals:
Function:
Timeout: 300
MemorySize: 256
Architectures:
- x86_64
Resources:
# Leaderboard Extractor Function
LeaderboardExtractorFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: extract-leaderboard/
Runtime: nodejs20.x
Handler: app.lambdaHandler
MemorySize: 512
Events:
ExtractLeaderboard:
Type: Schedule
Properties:
Schedule: rate(5 minutes)
# Match Extractor Function
MatchExtractorFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: extract-matches/
Runtime: nodejs20.x
Handler: app.lambdaHandler
Events:
ExtractMatches:
Type: Schedule
Properties:
Schedule: rate(1 hour)
# Civs Stats Extractor Function
CivsStatsExtractorFunction:
Type: AWS::Serverless::Function
Properties:
CodeUri: extract-stats/
Runtime: python3.11
Handler: civs_stats.lambda_handler
Events:
ExtractStats:
Type: Schedule
Properties:
Schedule: cron(0 2 * * ? *) # every day at 2 am UTC
Outputs:
LeaderboardExtractorFunctionArn:
Description: "ARN for the Leaderboard Extractor function"
Value: !GetAtt LeaderboardExtractorFunction.Arn
MatchExtractorFunctionArn:
Description: "ARN for the Match Extractor function"
Value: !GetAtt MatchExtractorFunction.Arn
CivsStatsExtractorFunctionArn:
Description: "ARN for the CivsStatsExtractorFunction"
Value: !GetAtt CivsStatsExtractorFunction.Arn