-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathserverless.yml
58 lines (53 loc) · 1.59 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: provided.al2023
architecture: x86_64
timeout: 5
memorySize: 512
package:
individually: true
functions:
server:
handler: bootstrap # newer runtimes require that the binary name is bootstrap and present in the root of the zip
# Proxy all HTTP requests to the lambda function
events:
- http:
path: /{proxy+}
method: any
package:
artifact: dist/mattermost-marketplace.zip # override the default artifact to point to the zip file we packaged
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