-
Notifications
You must be signed in to change notification settings - Fork 1
/
serverless.dist.yaml
42 lines (40 loc) · 1.05 KB
/
serverless.dist.yaml
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
service: sms-api
provider:
name : aws
runtime : nodejs12.x
region : ur-region-5
role : arn:aws:iam::AAAABBBBCCCCDDDD:role/lambda_execution
memorySize: 128
timeout : 5
stage : ${opt:stage, 'dev'}
functions:
send:
handler: src/index.send
description: API that sends SMS to a specified recipient
environment:
region : ${self:custom.region}
tableSmsRecords: ${self:custom.tables.smsRecords}
exclude:
- package-lock.json
events:
- http:
path : "/sendMessage"
method: post
history:
handler: src/index.history
description: API that retrieves the messages sent to a particular recipient
environment:
region : ${self:custom.region}
tableSmsRecords: ${self:custom.tables.smsRecords}
exclude:
- package-lock.json
events:
- http:
path : "/history"
method: get
resources:
- ${file(resources/dynamodb.yml)}
custom:
region: ${opt:region, self:provider.region}
tables:
smsRecords: sms_records