-
Notifications
You must be signed in to change notification settings - Fork 3
/
serverless.yml
42 lines (38 loc) · 1.3 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
# serverless.yml
#test
service: crud-demo
provider:
name: aws
apiKeys:
- ${env:MY_API_KEY}
usagePlan:
quota:
limit: 50 #The maximum number of requests that can be made in a given time period.
offset: 2 #The number of requests subtracted from the given limit in the initial time period.
period: MONTH #The time period in which the limit applies. Valid values are "DAY", "WEEK" or "MONTH".
throttle:
burstLimit: 10 #The maximum API request rate limit over a time ranging from one to a few seconds. The maximum API request rate limit depends on whether the underlying token bucket is at its full capacity.
rateLimit: 10 #The API request steady-state rate limit (average requests per second over an extended period of time)
runtime: nodejs8.10
stage: dev
region: ap-south-1
vpc:
securityGroupIds:
- "<security group ID>"
subnetIds:
- "<subnet ID>"
functions:
app:
handler: app.handler # reference the file and exported method
CodeUri: ./
events: # this is an API Gateway HTTP event trigger
- http:
path: /
method: ANY
cors: true
private: true
- http: # all routes get proxied to the Express router
path: /{proxy+}
method: ANY
cors: true
private: true