1 Answer
- Newest
- Most votes
- Most comments
0
In case anyone comes across this same problem, I never figured out the true root cause for this application. It was probably some configuration conflict between the Django app and the Elastic Beanstalk deployment.
I ended up starting from scratch with a fresh Django and Elastic Beanstalk CLI install but still ran into the same error. It turned out that the instructions online on Amazon's website are outdated and the newer Amazon Linux 2 does not have gunicorn installed by default. Installing gunicorn was the biggest help in solving the problem.
pip install gunicorn
Also, in case it helps, the following buildspec.yml worked:
version: 0.2
phases:
install:
runtime-versions:
python: 3.8
pre_build:
commands:
- lsb_release -a
- python -m venv venv
- . venv/bin/activate
- pip install --upgrade pip
- pip install -r mysite/requirements.txt
post_build:
commands:
- echo Build completed on `date`
artifacts:
files:
- '**/*'
base-directory: mysite
answered 4 years ago
Relevant content
- Accepted Answerasked 4 months ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 7 months ago