This repository was archived by the owner on Feb 26, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
89 lines (84 loc) · 2.34 KB
/
serverless.yml
File metadata and controls
89 lines (84 loc) · 2.34 KB
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
89
service: pluto-home
provider:
name: aws
runtime: nodejs8.10
environment: ${file(./env/${opt:stage}.yml)}
iamRoleStatements:
- Effect: "Allow"
Action:
- "s3:*"
Resource: "arn:aws:s3:::pluto-home/*"
- Effect: Allow
Action:
- "cloudwatch:PutMetricData"
Resource: "*"
package:
artifact: dst.zip
functions:
plutoRender:
handler: handler.ssr
timeout: 10
events:
- http:
path: frontRender
method: get
- http:
path: frontRender/{proxy+}
method: any
subscribeMail:
handler: handler.subscribeMail
timeout: 10
events:
- http:
path: subscribeMailingList
method: post
resources:
Resources:
PlutoRenderLogGroup:
Properties:
RetentionInDays: "30"
CloudFrontDistribution:
Type: AWS::CloudFront::Distribution
Properties:
DistributionConfig:
ViewerCertificate:
AcmCertificateArn: arn:aws:acm:us-east-1:966390130392:certificate/db902af7-a1ee-40ab-8145-9bd8b786ba39
SslSupportMethod: sni-only
DefaultRootObject: ""
Enabled: true
DefaultCacheBehavior:
DefaultTTL: 300
MaxTTL: 300
MinTTL: 300
AllowedMethods:
- GET
- HEAD
CachedMethods:
- HEAD
- GET
ForwardedValues:
QueryString: true
Headers:
- original-uri
- User-Agent
- X-Forwarded-For
TargetOriginId: "${self:service}-${opt:stage}-api-gateway"
ViewerProtocolPolicy: redirect-to-https
Aliases:
- ${file(./env/${opt:stage}.yml):DNS_ALIAS1}
- ${file(./env/${opt:stage}.yml):DNS_ALIAS2}
Origins:
- CustomOriginConfig:
HTTPSPort: 443
OriginProtocolPolicy: https-only
DomainName:
"Fn::Join":
[
"",
[
{ "Ref": "ApiGatewayRestApi" },
".execute-api.${self:provider.region}.amazonaws.com",
],
]
Id: "${self:service}-${opt:stage}-api-gateway"
OriginPath: /${opt:stage}/frontRender