I have a Python/Django app and I'm trying to get it deployed to AWS Elastic Beanstalk. I'm using the EB CLI. What I've run into is similar to others (e.g. Deploying Django to Elastic Beanstalk, migrations failed). But I can't get past the migration failure that is blocking a successful eb deploy
. I removed the .ebextensions/db-migrate.config
file from my project, but it seems like it's cached somewhere since the logs still show this:
...
2022-12-01 22:14:21,238 [INFO] Running config postbuild_0_ikfplatform
2022-12-01 22:14:21,272 [ERROR] Command 01_migrate (source /var/app/venv/*/bin/activate && python3 manage.py migrate) failed
2022-12-01 22:14:21,272 [ERROR] Error encountered during build of postbuild_0_ikfplatform: Command 01_migrate failed
...
My project's .ebextensions
folder now only has django.config
with the following contents:
option_settings:
aws:elasticbeanstalk:container:python:
WSGIPath: IFSRestAPI.wsgi:application
I'm baffled how eb deploy
is deciding to execute Django migration when I've deleted the db-migrate.config file from the face of the Earth.
How can I prevent Elastic Beanstalk from somehow magically running the migration command (which is no longer in my project)?
FYI: I can successfully migrate the RDS DB from my local computer which is fine for now.