Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

ahmeda's avatar

Error to deploy Laravel on AWS EB?

I just deploy the Laravel project on the EB throw pipeline and I got the error:

the log of says:

psy/psysh suggests installing hoa/console (A pure PHP readline implementation. You'll want this if your PHP install doesn't already support readline or libedit.)
aws/aws-sdk-php suggests installing aws/aws-php-sns-message-validator (To validate incoming SNS notifications)
filp/whoops suggests installing whoops/soap (Formats errors as SOAP responses)
facade/ignition suggests installing laravel/telescope (^3.1)
sebastian/global-state suggests installing ext-uopz (*)
phpunit/php-code-coverage suggests installing ext-pcov (*)
phpunit/php-code-coverage suggests installing ext-xdebug (*)
phpunit/phpunit suggests installing ext-xdebug (*)
Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1


2021/06/01 20:56:58.318979 [INFO] Executing cleanup logic
2021/06/01 20:56:58.319079 [INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment failed to install Composer dependencies specified in 'composer.json' in your source bundle. The deployment failed.","timestamp":1622581018,"severity":"ERROR"},{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1622581018,"severity":"ERROR"}]}]}

2021/06/01 20:56:58.319950 [INFO] Platform Engine finished execution on command: app-deploy

My composer.json file: https://paste.laravel.io/36654101-ac53-431d-98b8-c523def4b835

And I have this file in the root of project files:

.ebextensions/01-composer-install.config > contains:

 commands:
01_update_composer:
  command: export COMPOSER_HOME=/root && /usr/bin/composer.phar self-update

option_settings:
- namespace: aws:elasticbeanstalk:application:environment
  option_name: COMPOSER_HOME
  value: /root
0 likes
1 reply

Please or to participate in this conversation.