-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathserverless.yml
86 lines (79 loc) · 1.84 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: yeukfei05
app: singapore-bus-arrival
service: singapore-bus-arrival
frameworkVersion: '3'
useDotenv: true
provider:
name: aws
runtime: nodejs14.x
stage: prod
region: ap-southeast-1
apiName: singapore-bus-arrival-prod
tracing:
apiGateway: true
lambda: true
environment:
NODE_ENV: production
MY_AWS_ACCESS_KEY: ${param:MY_AWS_ACCESS_KEY}
MY_AWS_SECRET_ACCESS_KEY: ${param:MY_AWS_SECRET_ACCESS_KEY}
ACCOUNT_KEY: ${param:ACCOUNT_KEY}
iam:
role:
statements:
- Effect: 'Allow'
Action:
- 'xray:PutTraceSegments'
- 'xray:PutTelemetryRecords'
Resource:
- '*'
apiGateway:
shouldStartNameWithService: true
description: singapore bus arrival prod
architecture: arm64
timeout: 30
memorySize: 2000
functions:
allBusService:
handler: src/allBusService/handler.allBusService
events:
# - http:
# path: /all-bus-service
# method: get
# cors: true
- schedule: cron(0 1 1 * ? *)
timeout: 900
memorySize: 10000
# allBusRoute:
# handler: src/allBusRoute/handler.allBusRoute
# events:
# # - http:
# # path: /all-bus-route
# # method: get
# # cors: true
# - schedule: cron(0 1 1 * ? *)
# timeout: 900
# memorySize: 10000
allBusStop:
handler: src/allBusStop/handler.allBusStop
events:
# - http:
# path: /all-bus-stop
# method: get
# cors: true
- schedule: cron(0 1 1 * ? *)
timeout: 900
memorySize: 10000
graphql:
handler: src/graphql/handler.graphqlHandler
events:
- http:
path: /
method: post
cors: true
- http:
path: /
method: get
cors: true
plugins:
- serverless-plugin-typescript
- serverless-offline