-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
86 lines (78 loc) · 2.14 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
org: burslf
app: dropit-backend
service: delivery-api
frameworkVersion: '3'
provider:
name: aws
runtime: python3.8
region: us-east-1
stage: develop
profile: personal
environment: ${file(env.${opt:stage, self:provider.stage}.json)}
iam:
role:
statements:
- Effect: 'Allow'
Action:
- 's3:PutObject'
- 's3:GetObject'
Resource:
- '*'
package:
patterns:
- '!.env/**'
- '!node_modules/**'
functions:
api_resolve_address:
handler: api_endpoints/api_resolve_address.api_resolve_address
events:
- http:
path: "/resolve-address"
method: post
cors: true
layers:
- ${file(env.${opt:stage, self:provider.stage}.json):LAMBDA_HANDLER_LAYER_ARN}
api_get_available_timeslots:
handler: api_endpoints/api_get_timeslots.api_get_timeslots
events:
- http:
path: "/timeslots"
method: post
cors: true
layers:
- ${file(env.${opt:stage, self:provider.stage}.json):LAMBDA_HANDLER_LAYER_ARN}
api_book_delivery:
handler: api_endpoints/api_book_delivery.api_book_delivery
events:
- http:
path: "/deliveries"
method: post
cors: true
layers:
- ${file(env.${opt:stage, self:provider.stage}.json):LAMBDA_HANDLER_LAYER_ARN}
api_set_delivery_complete:
handler: api_endpoints/api_set_delivery_complete.api_set_delivery_complete
events:
- http:
path: "/deliveries/{delivery_id}/complete"
method: post
cors: true
request:
parameters:
paths:
delivery_id: true
layers:
- ${file(env.${opt:stage, self:provider.stage}.json):LAMBDA_HANDLER_LAYER_ARN}
api_cancel_delivery:
handler: api_endpoints/api_cancel_delivery.api_cancel_delivery
events:
- http:
path: "/deliveries/{delivery_id}"
method: delete
cors: true
request:
parameters:
paths:
delivery_id: true
layers:
- ${file(env.${opt:stage, self:provider.stage}.json):LAMBDA_HANDLER_LAYER_ARN}