-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
54 lines (48 loc) · 1.44 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: mfpv-discord
frameworkVersion: '3'
useDotenv: true
provider:
name: aws
runtime: nodejs18.x
lambdaHashingVersion: '20201221'
apiGateway:
shouldStartNameWithService: true
functions:
interactions:
handler: src/handlers/interactionsHandler.handler
events:
- http:
path: /interactions
method: POST
updateCommandsEvent:
handler: src/handlers/updateCommandsHandler.handler
events:
- schedule: cron(10 4 * * ? *) # 10 minutes after mfpv-backup https://github.com/minecraft-fpv/mfpv-backup/blob/master/serverless.yml#L35
- http:
path: /update_commands
method: ANY
asyncDownload: # interactions must respond immediately. Async work is passed to this lambda.
handler: src/handlers/asyncDownload.handler
events:
- http:
path: /async_download
method: ANY
async: true
asyncRestore: # interactions must respond immediately. Async work is passed to this lambda.
handler: src/handlers/asyncRestore.handler
# memorySize: 2048 # optional, in MB, default is 1024
timeout: 120 # optional, in seconds
events:
- http:
path: /async_restore
method: ANY
async: true
plugins:
- serverless-bundle # Package our functions with Webpack
- serverless-offline
- serverless-dotenv-plugin # Load .env as environment variables
custom:
bundle:
packager: yarn
serverless-offline:
httpPort: 4000