-
Notifications
You must be signed in to change notification settings - Fork 0
/
template.yml
51 lines (45 loc) · 1.05 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
AWSTemplateFormatVersion: "2010-09-09"
Transform: AWS::Serverless-2016-10-31
Parameters:
DomainName:
Type: String
ACMCertificateArn:
Type: String
Resources:
# Create log group for Access logs
AccessLogGroup:
Type: "AWS::Logs::LogGroup"
Properties:
RetentionInDays: 30
LogGroupName: !Ref DomainName
Gateway:
Type: AWS::Serverless::HttpApi
Properties:
Domain:
DomainName: !Ref DomainName
CertificateArn: !Ref ACMCertificateArn
MainFunction:
Type: AWS::Serverless::Function
Properties:
Architectures:
- arm64
CodeUri: .
Handler: main
Runtime: provided.al2
Events:
CatchAll:
Type: HttpApi
Properties:
ApiId: !Ref Gateway
Path: /{proxy+}
Method: ANY
Metadata:
BuildMethod: makefile
Globals:
Function:
LoggingConfig:
LogFormat: JSON
Outputs:
CNAME:
Description: The regional domain name for CNAME value
Value: !GetAtt [Gateway.DomainName, RegionalDomainName]