diff --git a/src/bref/README.md b/src/bref/README.md index a0a7e41e..12c1e533 100644 --- a/src/bref/README.md +++ b/src/bref/README.md @@ -31,27 +31,33 @@ Define the environment variable `APP_RUNTIME` for your application on Lambda. ## How to use -You need the extra lambda layer `arn:aws:lambda:[region]:403367587399:layer:bref-sf-runtime:1` -in serverless.yml. - -```yaml -# serverless.yml - -# ... - -functions: - app: - handler: public/index.php - timeout: 8 - layers: - - ${bref:layer.php-74} - - arn:aws:lambda:eu-central-1:403367587399:layer:bref-sf-runtime:1 - events: - - httpApi: '*' +You need a new "bootstrap" file for AWS Lambda. That file should look like +[this](https://github.com/brefphp/extra-php-extensions/blob/master/layers/symfony-runtime/bootstrap). +The simplest way is to use the `${bref-extra:symfony-runtime-php-80}` from the +[bref/extra-php-extension package](https://github.com/brefphp/extra-php-extensions). + +```diff + # serverless.yml + + # ... + + functions: + app: + handler: public/index.php + timeout: 8 + layers: + - ${bref:layer.php-74} ++ - ${bref-extra:symfony-runtime-php-80} + events: + - httpApi: '*' ``` +(You may also copy that bootstrap file yourself and place it in your project root.) + ### Symfony application +Use the standard Symfony 5.3+ index.php. + ```php // public/index.php @@ -64,7 +70,6 @@ return function (array $context) { }; ``` - ### PSR-15 application ```php @@ -120,6 +125,8 @@ to serverless.yml ### Console application +Use the standard Symfony 5.3+ bin/console. + ```php // bin/console