-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathserverless.yml
68 lines (62 loc) · 1.53 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
59
60
61
62
63
64
65
66
67
68
service: website
plugins:
- serverless-plugin-scripts
- serverless-webpack
- serverless-apigw-binary
- serverless-content-encoding
- serverless-cloudfront-invalidate
custom:
scripts:
hooks:
'before:package:createDeploymentArtifacts': yarn run-s copy-defs app/build
webpack:
packager: 'yarn'
webpackConfig: ./src/webpack/webpack.config.server.js
includeModules: true
cloudfrontInvalidate:
distributionId: 'E3U55U3N2RXSA3'
items:
- '/*'
regionAndAccount: us-east-1:251013100663
secretsArnPrefix: arn:aws:secretsmanager:${self:custom.regionAndAccount}:secret:${self:provider.stage}
apigwBinary:
types:
- '*/*'
contentEncoding:
minimumCompressionSize: 0
provider:
name: aws
runtime: nodejs8.10
memorySize: 512
timeout: 10
stage: ${opt:stage, 'development'}
region: us-east-1
environment:
NODE_ENV: ${env:NODE_ENV, 'development'}
STAGE: ${self:provider.stage}
BRANCH: ${env:BRANCH}
COMMIT_ID: ${env:COMMIT_ID}
iamRoleStatements:
- Effect: Allow
Action:
- secretsmanager:GetSecretValue
Resource:
- '${self:custom.secretsArnPrefix}/splunk/httpCollector/website/token-*'
functions:
servePages:
handler: src/servePages.servePages
events:
- http:
method: ANY
path: /
- http:
method: ANY
path: /{proxy+}
serveLogEndpoint:
handler: src/serveLogEndpoint.serveLogEndpoint
events:
- http:
method: POST
path: /log
package:
individually: true