-
Notifications
You must be signed in to change notification settings - Fork 32
/
Copy pathserverless.yml
36 lines (32 loc) · 1010 Bytes
/
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
service: bref-demo-sqs
plugins:
- ./vendor/bref/bref
provider:
name: aws
region: us-east-1
runtime: provided
environment:
APP_ENV: prod
APP_SECRET: 7ca3adc3815e12d67b4637595b7f9dff
MESSENGER_TRANSPORT_DSN: https://sqs.us-east-1.amazonaws.com/403367587399/foobar
functions:
api:
handler: public/index.php
description: ''
timeout: 28 # in seconds (API Gateway has a timeout of 29 seconds)
layers:
- ${bref:layer.php-74-fpm}
events:
- http: 'ANY /'
- http: 'ANY /{proxy+}'
worker:
handler: bin/consumer.php
timeout: 20 # in seconds
reservedConcurrency: 5 # max. 5 messages processed in parallel
layers:
- ${bref:layer.php-74}
events:
- sqs:
arn: arn:aws:sqs:us-east-1:403367587399:foobar
# Only 1 item at a time to simplify error handling
batchSize: 1