Reputation: 3576
I followed this tutorial: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html
I was able to stand up my Django project on my local MacBook pro, but when deploying to AWS EB, it failed, logs below:
2021/02/03 23:50:45.548154 [INFO] Executing instruction: StageApplication
2021/02/03 23:50:45.807282 [INFO] extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/
2021/02/03 23:50:45.807307 [INFO] Running command /bin/sh -c /usr/bin/unzip -q -o /opt/elasticbeanstalk/deployment/app_source_bundle -d /var/app/staging/
2021/02/03 23:50:46.552599 [INFO] finished extracting /opt/elasticbeanstalk/deployment/app_source_bundle to /var/app/staging/ successfully
2021/02/03 23:50:46.553257 [ERROR] An error occurred during execution of command [app-deploy] - [StageApplication]. Stop running the command. Error: chown /var/app/staging/bin/python: no such file or directory
2021/02/03 23:50:46.553265 [INFO] Executing cleanup logic
2021/02/03 23:50:46.553350 [INFO] CommandService Response: {"status":"FAILURE","api_version":"1.0","results":[{"status":"FAILURE","msg":"Engine execution has encountered an error.","returncode":1,"events":[{"msg":"Instance deployment failed. For details, see 'eb-engine.log'.","timestamp":1612396246,"severity":"ERROR"}]}]}
My research led me to this post: AWS Elastic Beanstalk chown PythonPath error, but when I tried the suggested command: git rm -r --cached venv
in my project directory, it returned:
fatal: pathspec 'venv' did not match any files
Upvotes: 1
Views: 1893
Reputation: 561
If you type eb logs
into the command line and look for the eb-engine.log section you might be able to get more details.
Also maybe verify that you set up you eb cli correctly. Here is the link to setting it up, look at section 2.3 and make sure you have all the requirements installed appropriately.
https://github.com/aws/aws-elastic-beanstalk-cli-setup
Finally double check your python version(s) you have installed. the tutorial is calling python-3.6
but you may not have that version installed.
Upvotes: 1