-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
54 lines (49 loc) · 1.11 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
service: auction-service
plugins:
- serverless-pseudo-parameters
provider:
name: aws
runtime: nodejs20.x
memorySize: 256
stage: ${opt:stage, 'dev'}
region: ap-southeast-1
environment:
AUCTIONS_TABLE_NAME: ${self:custom.AuctionsTable.name}
iam:
role:
statements:
- ${file(iam/AuctionsTableIAM.yml):AuctionsTableIAM}
resources:
Resources:
AuctionsTable: ${file(resources/AuctionsTable.yml):AuctionsTable}
functions:
createAuction:
handler: src/handlers/createAuction.handler
events:
- http:
method: POST
path: /auction
getAuctions:
handler: src/handlers/getAuctions.handler
events:
- http:
method: GET
path: /auctions
getAuction:
handler: src/handlers/getAuction.handler
events:
- http:
method: GET
path: /auction/{id}
placeBid:
handler: src/handlers/placeBid.handler
events:
- http:
method: PATCH
path: /auction/{id}/bid
custom:
AuctionsTable:
name: !Ref AuctionsTable
arn: !GetAtt AuctionsTable.Arn
bundle:
linting: false