-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
34 lines (31 loc) · 865 Bytes
/
serverless.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
service: redirector
frameworkVersion: '2'
provider:
name: aws
runtime: nodejs12.x
region: us-east-1
my_domain: maslick.tech
my_cert: arn:aws:acm:us-east-1:563262197653:certificate/3b0f6fb7-ac73-4f95-987a-533db7624b8d
functions:
edger:
handler: handler.hello
memorySize: 128
timeout: 5
events:
- cloudFront:
eventType: viewer-request
origin: https://dummy.domain
behavior:
ViewerProtocolPolicy: redirect-to-https
resources:
Resources:
CloudFrontDistribution:
Type: AWS::CloudFront::Distribution
Properties:
DistributionConfig:
Aliases:
- ${self:provider.my_domain}
ViewerCertificate:
AcmCertificateArn: ${self:provider.my_cert}
MinimumProtocolVersion: "TLSv1.2_2018"
SslSupportMethod: sni-only