File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -31,27 +31,33 @@ Define the environment variable `APP_RUNTIME` for your application on Lambda.
3131
3232## How to use
3333
34- You need the extra lambda layer ` arn:aws:lambda:[region]:403367587399:layer:bref-sf-runtime:1 `
35- in serverless.yml.
36-
37- ``` yaml
38- # serverless.yml
39-
40- # ...
41-
42- functions :
43- app :
44- handler : public/index.php
45- timeout : 8
46- layers :
47- - ${bref:layer.php-74}
48- - arn:aws:lambda:eu-central-1:403367587399:layer:bref-sf-runtime:1
49- events :
50- - httpApi : ' *'
34+ You need a new "bootstrap" file for AWS Lambda. That file should look like
35+ [ this] ( https://github.com/brefphp/extra-php-extensions/blob/master/layers/symfony-runtime/bootstrap ) .
36+ The simplest way is to use the ` ${bref-extra:symfony-runtime-php-80} ` from the
37+ [ bref/extra-php-extension package] ( https://github.com/brefphp/extra-php-extensions ) .
38+
39+ ``` diff
40+ # serverless.yml
41+
42+ # ...
43+
44+ functions:
45+ app:
46+ handler: public/index.php
47+ timeout: 8
48+ layers:
49+ - ${bref:layer.php-74}
50+ + - ${bref-extra:symfony-runtime-php-80}
51+ events:
52+ - httpApi: '*'
5153```
5254
55+ (You may also copy that bootstrap file yourself and place it in your project root.)
56+
5357### Symfony application
5458
59+ Use the standard Symfony 5.3+ index.php.
60+
5561``` php
5662// public/index.php
5763
@@ -64,7 +70,6 @@ return function (array $context) {
6470};
6571```
6672
67-
6873### PSR-15 application
6974
7075``` php
@@ -120,6 +125,8 @@ to serverless.yml
120125
121126### Console application
122127
128+ Use the standard Symfony 5.3+ bin/console.
129+
123130``` php
124131// bin/console
125132
You can’t perform that action at this time.
0 commit comments