-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
98 lines (91 loc) · 2.27 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
86
87
88
89
90
91
92
93
94
95
96
97
98
service:
name: auction-service
plugins:
- serverless-bundle
- serverless-pseudo-parameters
provider:
name: aws
runtime: nodejs12.x
memorySize: 256
stage: ${opt:stage, 'dev'}
region: ap-south-1
environment:
CLIENT_ID: '2jr56qs4jaf6gkkkeuaoit3rgc'
AUCTIONS_TABLE_NAME: ${self:custom.AuctionsTable.name}
iamRoleStatements:
- ${file(iam/AuctionsTableIAM.yaml):AuctionsTableIAM}
- Effect: 'Allow'
Action:
- 'ses:*'
Resource:
- '*'
resources:
Resources:
AuctionsTable: ${file(resources/AuctionsTable.yaml):AuctionsTable}
functions:
createNewUser:
handler: src/handlers/createNewUser.handler
events:
- http:
method: POST
path: /user
cors: true
sendConfirmationCode:
handler: src/handlers/sendConfirmationCode.handler
events:
- cognitoUserPool:
pool: 'EC-Newsletter-Subscription'
trigger: CustomMessage
existing: true
confirmNewUser:
handler: src/handlers/confirmNewUser.handler
events:
- http:
method: POST
path: /confirmuser
cors: true
createAuction:
handler: src/handlers/createAuction.handler
events:
- http:
method: POST
path: /auction
cors: true
getAuctions:
handler: src/handlers/getAuctions.handler
events:
- http:
method: GET
path: /auctions
cors: true
getAuction:
handler: src/handlers/getAuction.handler
events:
- http:
method: GET
path: /auction/{id}
cors: true
placeBid:
handler: src/handlers/placeBid.handler
events:
- http:
method: PATCH
path: auction/{id}/bid
cors: true
processAuctions:
handler: src/handlers/processAuctions.handler
# events:
# - schedule: rate(1 minute)
sendRemainderDaily:
handler: src/handlers/sendRemainderDaily.handler
events:
# - schedule: rate(1 day)
custom:
AuctionsTable:
name: !Ref AuctionsTable
arn: !GetAtt AuctionsTable.Arn
bundel:
linting: false
# copyFiles: # Copy any additional files to the generated package
# - from: 'src/lib/mail.html' # Where the files are currently
# to: './html/' # Where in the package should they go