-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless.yml
47 lines (43 loc) · 1.07 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
service: pack-calc
provider:
name: aws
region: eu-west-1
runtime: provided
apiGateway:
apiKeySourceType: HEADER
apiKeys:
- public:
- publicKey
usagePlan:
- public:
quota:
limit: 10000
period: MONTH
throttle:
burstLimit: 10
rateLimit: 1
plugins:
- ./vendor/bref/bref
functions:
calculate:
handler: lambda.php
description: 'Calculates the required number of packs for a quantity of items'
timeout: 28 # in seconds (API Gateway has a timeout of 29 seconds)
layers:
- ${bref:layer.php-74}
events:
- http:
path: calculate
method: post
request:
schema:
application/json: ${file(request_schema.json)}
private: true
# Exclude files from deployment
package:
exclude:
- 'example/**'
- 'tests/**'
- '*.png'
- '*.md'
- 'Dockerfile'