forked from Code-For-Israel/node-express-rest-api
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathserverless.yml
43 lines (38 loc) · 952 Bytes
/
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
service: haverim-lerefua
frameworkVersion: '3'
plugins:
- serverless-plugin-typescript
# custom:
# profiles:
# dev: dev
# prod: prod
custom:
profiles:
dev: dev
prod: prod
table-names:
medicines: ${self:service}-${self:provider.profile}-medicines
medicine-names: ${self:service}-${self:provider.profile}-medicine-names
collection-sites: ${self:service}-${self:provider.profile}-sites
provider:
name: aws
runtime: nodejs18.x
# profile: ${self:custom.profiles.${sls:stage}}
profile: ${self:custom.profiles.${sls:stage}}
iam:
role:
statements:
- Effect: Allow
Action:
- dynamodb:Query
Resource: !GetAtt MedicineNameTable.Arn
functions:
api:
handler: src/index.handler
events:
- httpApi: '*'
environment:
MEDICINE_NAMES_TABLE: ${self:custom.table-names.medicine-names}
LOG_LEVEL: info
resources:
- ${file(infra/dynamo-db.yml)}