-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yaml
executable file
·53 lines (44 loc) · 1.06 KB
/
serverless.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
41
42
43
44
45
46
47
48
49
50
51
52
53
service: sqs_sns
provider:
name: aws
runtime: nodejs14.x
region: us-east-1
profile: learn-sns
environment:
DYNAMO_TABLE_PRODUCTS: products
DYNAMO_TABLE_PRODUCTS_EVENTS: products-events
custom:
webpack:
concurrency: 4 # desired concurrency, defaults to the number of available cores
package:
individually: true
plugins:
- serverless-webpack
- serverless-offline
functions:
event-processor:
handler: src/event-processor/index.handler
create-product:
handler: src/controllers/products/create/index.handler
events:
- http:
path: products
method: post
get-products:
handler: src/controllers/products/get/index.handler
events:
- http:
path: products
method: get
get-product:
handler: src/controllers/products/get-by-id/index.handler
events:
- http:
path: products/{id}
method: get
remove-product:
handler: src/controllers/products/remove/index.handler
events:
- http:
path: products/{id}
method: delete