-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yaml
88 lines (75 loc) · 1.99 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
AWSTemplateFormatVersion: '2010-09-09'
Transform: 'AWS::Serverless-2016-10-31'
Globals:
Function:
Environment:
Variables:
MONGO_HOST: !Ref MongoHost
MONGO_DATABASE: !Ref MongoDatabase
MONGO_TEAMS_COLLECTION: !Ref MongoTeamsCollection
MONGO_GAMES_COLLECTION: !Ref MongoGamesCollection
MONGO_MAPPINGS_COLLECTION: !Ref MongoMappingsCollection
MONGO_TOURNAMENTS_COLLECTION: !Ref MongoTournamentsCollection
MONGO_LEAGUES_COLLECTION: !Ref MongoLeaguesCollection
MONGO_PLAYERS_COLLECTION: !Ref MongoPlayersCollection
Timeout: 300
Parameters:
MongoHost:
Type: String
MongoDatabase:
Type: String
Default: "riot"
MongoTeamsCollection:
Type: String
Default: "teams"
MongoMappingsCollection:
Type: String
Default: "mappings"
MongoLeaguesCollection:
Type: String
Default: "leagues"
MongoPlayersCollection:
Type: String
Default: "players"
MongoTournamentsCollection:
Type: String
Default: "tournaments"
MongoGamesCollection:
Type: String
Default: "tournaments"
Runtime:
Type: String
Default: "provided.al2023"
Architecture:
Type: String
Default: "arm64"
Handler:
Type: String
Default: bootstrap
Resources:
Api:
Type: 'AWS::Serverless::Function'
Properties:
CodeUri: ./cmd/api/
Runtime: !Ref Runtime
Handler: !Ref Handler
Environment:
Variables:
MONGO_HOST: !Ref MongoHost
LAMBDA_INSIGHTS_LOG_LEVEL: info
AWS_LWA_READINESS_CHECK_PATH: "/status"
LISTEN_HOST: "localhost"
LISTEN_PORT: "8080"
Layers:
- !Sub arn:aws:lambda:${AWS::Region}:753240598075:layer:LambdaAdapterLayerArm64:20
Architectures:
- !Ref Architecture
Events:
ApiEvent:
Type: HttpApi
Policies:
Tags:
FuncNameTag: !Sub ${AWS::StackName}-API
FunctionName: !Sub ${AWS::StackName}-API
Metadata:
BuildMethod: go1.x