-
Notifications
You must be signed in to change notification settings - Fork 4
/
serverless.yml
63 lines (58 loc) · 1.44 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
service: abap-package-version-shield
# org: sbcgua
# app: abapversionshield
provider:
name: aws
runtime: nodejs18.x
region: eu-west-1
stage: ${opt:stage, 'dev'}
package:
patterns:
- '!**'
- 'package.json'
- 'package-lock.json'
- 'handler.js'
- 'node_modules/**'
- 'lib/**'
functions:
getAbapVersionShieldJson:
handler: handler.getShieldJson
memorySize: 128
events:
- http:
path: version-shield-json/{sourcePath+}
method: get
cors: true
- http:
path: /
# cors: true
method: get
integration: mock
request:
template:
application/json: '{"statusCode": 301}'
response:
template: redirect
headers:
Location: "'https://sbcgua.github.io/abap-package-version-shield'"
statusCodes:
301:
pattern: ''
plugins:
- serverless-domain-manager
custom:
stageDomainName:
dev: dev-shield.abap.space
qa: qa-shield.abap.space
prod: shield.abap.space
stageCertificateName:
dev: '*.abap.space'
qa: '*.abap.space'
prod: '*.abap.space'
customDomain:
domainName: ${self:custom.stageDomainName.${self:provider.stage}}
certificateName: ${self:custom.stageCertificateName.${self:provider.stage}}
endpointType: 'regional'
basePath: ''
stage: ${self:provider.stage}
createRoute53Record: true