php-examples-for-aws-lambda icon indicating copy to clipboard operation
php-examples-for-aws-lambda copied to clipboard

No such file or directory in /opt/bootstrap on line 20

Open tigerjun98 opened this issue 4 years ago • 3 comments

Response { "errorMessage": "RequestId: ae39bce3-185d-4011-8edd-251bdb4a6f52 Error: Runtime exited with error: exit status 255", "errorType": "Runtime.ExitError" }

Function Logs START RequestId: ae39bce3-185d-4011-8edd-251bdb4a6f52 Version: $LATEST Warning: require(/opt/vendor/autoload.php): failed to open stream: No such file or directory in /opt/bootstrap on line 20 Fatal error: require(): Failed opening required '/opt/vendor/autoload.php' (include_path='.:/home/ec2-user/environment/php-7-bin/lib/php') in /opt/bootstrap on line 20 END RequestId: ae39bce3-185d-4011-8edd-251bdb4a6f52 REPORT RequestId: ae39bce3-185d-4011-8edd-251bdb4a6f52 Duration: 125.65 ms Billed Duration: 126 ms Memory Size: 128 MB Max Memory Used: 9 MB RequestId: ae39bce3-185d-4011-8edd-251bdb4a6f52 Error: Runtime exited with error: exit status 255 Runtime.ExitError

tigerjun98 avatar Aug 13 '21 09:08 tigerjun98

I also got this error, does anyone help?

VVNN0322 avatar Oct 24 '21 06:10 VVNN0322

had the same issue, to fix it replace all $_ENV for getenv and it will work!

romulodl avatar Oct 26 '21 09:10 romulodl

The $_ENV fix was not my issue. I was missing the autoload.php file in my venfor.zip. Make sure you have run php composer.phar install, which generates the autoload.php file, before you zip up the vendor files.

JWesorick avatar May 16 '22 04:05 JWesorick