-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
61 lines (59 loc) · 1.31 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
service: ddns-updater
plugins:
- serverless-domain-manager
- serverless-webpack
provider:
name: aws
runtime: nodejs14.x
region: us-east-1
memorySize: 128
timeout: 3
iam:
role:
statements:
- Effect: Allow
Action:
- lambda:InvokeFunction
Resource: arn:aws:lambda:*:*:function:${self:custom.process}
- Effect: Allow
Action:
- route53:ListHostedZones
- route53:ListResourceRecordSets
- route53:ChangeResourceRecordSets
Resource: "*"
custom:
domain: ${file(config.json):update_endpoint}
region: ${self:provider.region}
stage: ${sls:stage}
prefix: ${self:custom.stage}-${self:service}
process: ${self:custom.prefix}-process
customDomain:
basePath: ""
domainName: ${self:custom.domain}
stage: ${self:custom.stage}
createRoute53Record: true
webpack:
webpackConfig: 'webpack.config.js'
includeModules:
forceExclude:
- aws-sdk
package:
individually: true
functions:
index:
timeout: 10
handler: src/handler.index
events:
- http:
path: "/"
method: any
update:
timeout: 10
handler: src/handler.update
events:
- http:
path: update
method: any
authorizer: auth
auth:
handler: src/auth.auth