Error: no vendor directory #1246
SESA634269
started this conversation in
General
Replies: 1 comment 1 reply
-
The zip that is deployed to Lambda probably doesn't contain the |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Requesting help needed Php lambda logs showing error from runtime bootstrap file:
PHP Warning: require(/var/task/vendor/autoload.php): Failed to open stream: No such file or directory in /opt/bootstrap on line 25
PHP Fatal error: Uncaught Error: Failed opening required '/var/task/vendor/autoload.php' (include_path='.:/opt/bref/lib/php') in /opt/bootstrap:25
How to reproduce:
Actually We where using PHP 7.3 FPM layer - arn:aws:lambda:eu-west-1:209497400698:layer:php-73-fpm:25
but because of Invoke error happing very frequently we decided to update Bref library for PHP 8.0 so following this repo -https://github.com/aws-samples/php-examples-for-aws-lambda/tree/master/0.1-SimplePhpFunction#creating-dependencies, created new vendor with bref for Php 8.0 installed with in cloud9. but getting above mentioned error with layer - arn:aws:lambda:eu-west-1:209497400698:layer:php-80-fpm:40 , from runtime bref. because the original php lambda is not developed by me also i do not have such deep knowledge in Php I'm really seeking for some help around.
This is the file structure of original working PHP lambda , I'm also trying to replicate the same structure. so As shown in below we have vendor folder next to main source code and lambda have only one layer provided by bref runtime.
please let me know any solution Thanking in advance.
Beta Was this translation helpful? Give feedback.
All reactions