-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserverless.yml
More file actions
109 lines (105 loc) · 2.49 KB
/
serverless.yml
File metadata and controls
109 lines (105 loc) · 2.49 KB
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
service: sdn-dataset-api
plugins:
- serverless-dotenv-plugin
- serverless-offline
custom:
dotenv:
path: .env
provider:
name: aws
runtime: nodejs8.10
stage: dev
region: us-east-1
iamRoleStatements:
- Effect: Allow
Action:
- es:*
- sns:*
Resource: "*"
enviroment:
AWS_SERVICE_REGION: ${env:AWS_SERVICE_REGION}
SDN_ACCESS_KEY: ${env:SDN_ACCESS_KEY}
ES_URL: ${env:ES_URL}
ES_INDEX: ${env:ES_INDEX}
ES_DOC_TYPE: ${env:ES_DOC_TYPE}
TEST_HOST: ${env:TEST_HOST}
TEST_PORT: ${env:TEST_PORT}
SNS_BOOTSTRAP_QUEUE: { "Ref": "SNSBootstrapQueue" }
functions:
searchDatasets:
handler: dist/api/index.handler
events:
- http:
path: /api/datasets/search
method: get
cors: true
request:
parameters:
querystrings:
q: false
getDataset:
handler: dist/api/index.handler
events:
- http:
path: /api/datasets/{id}
method: get
cors: true
request:
parameters:
paths:
id: true
getDatasetDCAT:
handler: dist/api/index.handler
events:
- http:
path: /api/datasets/{id}/dcat
method: get
cors: true
request:
parameters:
paths:
id: true
getDatasetMetadata:
handler: dist/api/index.handler
events:
- http:
path: /api/datasets/{id}/metadata
method: get
cors: true
request:
parameters:
paths:
id: true
createIndex:
handler: dist/api/index.handler
events:
- http:
path: /api/admin/es/index
method: post
authorizer:
name: authorizer
identitySource: method.request.header.token
type: token
deleteIndex:
handler: dist/api/index.handler
events:
- http:
path: /api/admin/es/index
method: delete
authorizer:
name: authorizer
identitySource: method.request.header.token
type: token
bootstrapPipeline:
handler: dist/api/index.handler
events:
- http:
path: /api/admin/pipeline/bootstrap
method: post
authorizer:
name: authorizer
identitySource: method.request.header.token
type: token
authorizer:
name: sdn-api-authorizer
handler: dist/lambda/auth/index.auth