-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
86 lines (76 loc) · 1.7 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
org: hhassan
app: orbital-serverless
service: accounts-service
provider:
name: aws
runtime: nodejs20.x
region: eu-north-1
environment:
MONGODB_URI: ${env:MONGODB_URI}
EVENT_BUS_NAME: ${env:EVENT_BUS_NAME}
EVENT_SOURCE: ${env:EVENT_SOURCE}
AWS_ACCOUNT_REGION: ${env:AWS_ACCOUNT_REGION}
iam:
role:
statements:
- Effect: Allow
Action:
- events:PutEvents
Resource:
- arn:aws:events:${env:AWS_ACCOUNT_REGION}:${env:AWS_ACCOUNT_ID}:event-bus/${env:EVENT_BUS_NAME}
functions:
createAccount:
handler: src/handlers/createAccount.handler
events:
- http:
path: accounts
method: post
getAccount:
handler: src/handlers/getAccount.handler
events:
- http:
path: accounts/{accountId}
method: get
updateAccount:
handler: src/handlers/updateAccount.handler
events:
- http:
path: accounts/{accountId}
method: put
createTransaction:
handler: src/handlers/createTransaction.handler
events:
- http:
path: transactions
method: post
getTransactions:
handler: src/handlers/getTransactions.handler
events:
- http:
path: transactions/{accountId}
method: get
package:
individually: true
exclude:
- coverage/**
- tests/**
- jest.config.js
- README.md
- .prettierrc
- .gitignore
- .git/**
- .github/**
plugins:
- serverless-offline
build:
esbuild:
bundle: true
minify: true
sourcemap: false
target: "node20"
platform: "node"
exclude:
- "jest"
- "mongodb-memory-server"
- "prettier"
buildConcurrency: 10