forked from microsoft/FHIR-Converter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
173 lines (164 loc) · 4.21 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
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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
service: rosetta
provider:
name: aws
runtime: nodejs12.x
endpointType: regional
region: ${opt:region, 'us-east-1'}
stage: ${opt:stage, 'dev'}
apiGateway:
shouldStartNameWithService: true
memorySize: 512
timeout: 6
logRetentionInDays: 14
tracing:
apiGateway: true
lambda: true
environment:
AWS_XRAY_CONTEXT_MISSING: LOG_ERROR
NODE_ENV: ${opt:stage, 'dev'}
LOG_LEVEL: 'info'
deploymentBucket:
name: ${self:provider.stage}-${self:provider.region}-rosetta-sls
# Update the following tags for this application
tags:
hi:app:name: lambda-${self:service}
hi:department:name: hl7cc-rosetta
hi:department:email: [email protected]
hi:app:domain: template
hi:app:runtime: ${self:provider.runtime}
# Sample of permission for lambda->lambda
# - Effect: Allow
# Action:
# - lambda:InvokeFunction
# Resource: "arn:aws:lambda:${self:provider.region}:*:function:LambdaService-${self:provider.stage}-LambdaFunction"
resources:
Resources:
##############################################
## Used for Enabling Metics on API Stage ##
##############################################
ApiGatewayStage:
Type: AWS::ApiGateway::Stage
Properties:
DeploymentId:
Ref: __deployment__ # provided by serverless-plugin-bind-deployment-id
RestApiId:
Ref: ApiGatewayRestApi
StageName: ${self:provider.stage}
MethodSettings:
- HttpMethod: '*'
LoggingLevel: INFO
MetricsEnabled: true
ResourcePath: '/*'
functions:
app:
handler: src/index.handler
events:
- http:
method: GET
path: /api-docs
cors: false
private: false
- http:
method: GET
path: /api-docs/swagger-ui.css
cors: false
private: false
- http:
method: GET
path: /api-docs/swagger-ui-bundle.js
cors: false
private: false
- http:
method: GET
path: /api-docs/swagger-ui-standalone-preset.js
cors: false
private: false
- http:
method: GET
path: /api-docs/swagger-ui-init.js
cors: false
private: false
- http:
method: GET
path: /api/helpers
cors: true
private: true
- http:
method: GET
path: /api/sample-data
cors: true
private: true
- http:
method: GET
path: /api/sample-data/{srcDataType}/{file}
cors: true
private: true
- http:
method: GET
path: /api/templates
cors: true
private: true
- http:
method: GET
path: /api/templates/{srcDataType}/{file}
cors: true
private: true
- http:
method: PUT
path: /api/templates/{srcDataType}/{file}
cors: true
private: true
- http:
method: DELETE
path: /api/templates/{srcDataType}/{file}
cors: true
private: true
- http:
method: POST
path: /api/UpdateBaseTemplates
cors: true
private: true
- http:
method: POST
path: /api/convert/{srcDataType}
cors: true
private: true
- http:
method: POST
path: /api/convert/{srcDataType}/{template}
cors: true
private: true
custom:
serverless-offline:
httpPort: 2019
###Used for Assigning Function to Custom API Domain
customDomain:
domainName: rosetta.hl7.cc
certificateName: 'hl7.cc'
stage: ${self:provider.stage}
endpointType: 'regional'
createRoute53Record: true
plugins:
- serverless-offline
- serverless-plugin-tracing
- serverless-domain-manager
- serverless-plugin-bind-deployment-id
- serverless-pseudo-parameters
package:
exclude:
- .idea/**
- .nyc_output/**
- '*.iml'
- buildspec.yml
- coverage/**
- LICENSE
- mochawesome-report/**
- qa-dashboard.sh
- CHANGELOG.md
- README.md
- README-sample.md
- ABOUT.md
- swagger.yml
- template.yml
- test/**
- test-report.xml