Reputation: 829
After completing the EB "example-application", I downloaded what I believe is the original php application zip from https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/GettingStarted.DeployApp.html and made a couple of couple of changes in the text only (like modifying one <p>
to contain hello world
)...
When I tried uploading and deploying the "modified" app EB showed me "Instance deployment: You didn't include a 'composer.json' file in your source bundle. The deployment didn't install Composer dependencies."
So I created a composer.json and ran composer update
which created a vendor folder. But even after this I still got the same errors. I looked at similar questions on Stackoverflow and tried following their solutions but none of them helped. Here's what my directory looks like
.ebextensions
logging.config
vendor
composer
autoload_classmap.php
autoload_namespaces.php
autoload_psr4.php
autoload_real.php
autoload_static.php
ClassLoader.php
installed.json
LICENSE
monolog
monolog
...
autoload.php
composer.json
composer.lock
cron.yaml
index.php
logo_aws_reduced.gif
scheduled.php
styles.css
If it helps, you can download the zip from docs.amazon.com
Upvotes: 2
Views: 3889
Reputation: 302
It's a false error message. From the docs: When Elastic Beanstalk finds a vendor folder on the instance, it ignores the composer.json file (even if it exists). Your application then uses dependencies from the vendor folder.
Upvotes: 2