-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
49 lines (44 loc) · 1.18 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
service: phone-number
frameworkVersion: "=1.67.0"
provider:
name: aws
runtime: nodejs12.x
stage: dev
region: ap-southeast-2
tracing:
apiGateway: true
lambda: true
iamRoleStatements:
- Action:
- 'xray:PutTraceSegments'
- 'xray:PutTelemetryRecords'
Resource: '*'
Effect: 'Allow'
functions:
getAllPhoneNumnbers:
handler: src/handlers/getAllPhoneNumbers.handler
iamRoleStatementsInherit: true
events:
- http:
path: phonenumbers/all
method: get
getCustomerPhoneNumbers:
handler: src/handlers/getCustomerPhoneNumbers.handler
iamRoleStatementsInherit: true
events:
- http:
path: phonenumbers/customer
method: post
request:
schema:
application/json: ${file(src/handlers/getCustomerPhoneNumbers-request-schema.json)}
activatePhoneNumber:
handler: src/handlers/activatePhoneNumber.handler
iamRoleStatementsInherit: true
events:
- http:
path: phonenumbers/activate
method: post
request:
schema:
application/json: ${file(src/handlers/activatePhoneNumber-request-schema.json)}