I write a bash script to run the laravel envoy command in Elastic Beanstalk.
#!/bin/sh
cd /var/app/current/
sudo php vendor/bin/envoy run fillData &
And it gives errors as:
Unsuccessful command execution on the instance
And when accessing the EC2 terminal and running the command, it works fine with no errors.
I fixed the issue
As if found this
WARN
in elastic beanstalk AWSAs I understand the command continued running and did not stop
I found this article
fixing-a-mysterious-ebextensions-command-time-out-aws-elastic-beanstalk
and I wrote this command in bash file
nohup
command to run in the background,>/dev/null
and it will put all the results onso it will ignore the result you can find more details about >/dev/null