Description
I cannot get this to work whatsoever, and because of a lack of logs I don't know where it's going wrong.
I have a Laravel project that I want to deploy using the CDK like this:
this.backend = new PhpFpmFunction(this, `Backend-${STAGE}`, {
handler: 'public/index.php',
code: packagePhpCode('code/backend'),
phpVersion: '8.3',
vpc: props.vpc
}
It all deploys fine, but when visiting the resulting URL, I get an Internal Server Error
, with the CloudWatch containins only this:
INIT_REPORT Init Duration: 404.55 ms Phase: invoke Status: error Error Type: Runtime.ExitError
START RequestId: dc4f6c9f-eee8-44d2-82ea-317cda3ac07b Version: $LATEST
RequestId: dc4f6c9f-eee8-44d2-82ea-317cda3ac07b Error: Runtime exited with error: exit status 255 Runtime.ExitError
No further useful info at all.
I tried debugging locally using docker and found out the same Runtime.ExitError
happened there, which was due to not having bref/bref
and bref/laravel-bridge
installed.
However, after installing, the error went away locally, but it still happens on Lambda after redeploying.
I did notice that when I download the code from lambda, the vendor
directory only contains aws/
and autoload.php
, not any of the dependencies. If I run locally on docker with only these present, I also get a Runtime.ExitError
.