forked from mattermost/mattermost-marketplace
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
58 lines (53 loc) · 1.38 KB
/
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
service: mattermost-marketplace
frameworkVersion: '>=3.36.0 <4.0.0'
provider:
name: aws
stage: ${opt:stage, 'dev'}
region: us-east-1
runtime: go1.x
timeout: 5
memorySize: 512
package:
exclude:
- ./**
include:
- ./dist/**
functions:
server:
handler: dist/marketplace-lambda
# Proxy all HTTP requests to the lambda function
events:
- http:
path: /{proxy+}
method: any
resources:
Resources:
CloudFrontDistribution:
Type: AWS::CloudFront::Distribution
Properties:
DistributionConfig:
Comment: Marketplace Cache
DefaultCacheBehavior:
TargetOriginId: Marketplace
ViewerProtocolPolicy: 'redirect-to-https'
DefaultTTL: 30
ForwardedValues:
QueryString: true
QueryStringCacheKeys:
- filter
- per_page
- page
- server_version
Enabled: true
Origins:
- Id: Marketplace
DomainName:
Fn::Join:
- "."
- - Ref: ApiGatewayRestApi
- execute-api.us-east-1.amazonaws.com
OriginPath: /${self:provider.stage}
CustomOriginConfig:
HTTPPort: 80
HTTPSPort: 443
OriginProtocolPolicy: https-only