Error file directory not found when running Bref CLI in AWS codebuild
Description:
We are deploying our Laravel app on AWS Lambda using Bref plugin. We have been running the artisan migrate command in the Codebuild environment for sometime however it has stopped working. Example command running in Codebuild project is vendor/bin/bref cli function-name-artisan --region eu-west-2 -- migrate. The error produced is vendor/bin/bref: 1: ../bref/bref/bref: not found
We have verified that the codebuild is in the correct root folder of the code. Vendor folder is visible and all its contents.
Codebuild environment is running php 8.1. Both application and artisan layers on the lambda function are running php8.1
layers: - ${bref:layer.php-81} - ${bref:layer.console} # The "console" layer
How to reproduce:
Attempt to run vendor/bin/bref cli function-name-artisan --region eu-west-2 -- migrate from AWS Codebuild.
Running from local machine is working successfully.
The error is vendor/bin/bref: 1: ../bref/bref/bref: not found, which means the Bref package doesn't look like it's correctly installed by Composer for some reason (because the file is not found).
Could you check why this file doesn't exist? Are you manually removing any file before the command is run?
Closing because of inactivity.