Reputation: 197
In my django app with the standard folder structure I have created an .ebignore file with the following content:
# SQLite
db.sqlite3
The purpose is that when I deploy to AWS EB my SQLite database won't get overwritten. I want to keep the SQLite database on my server unchanged when I modify my app.
However, after I deploy ('eb deploy') and I visit the /admin url of my website I get the following error:
no such table: django_session
What's the correct way to re-deploy to AWS without overwriting the SQLite database?
Upvotes: 1
Views: 620
Reputation: 599796
You cannot do this. Elastic Beanstalk, just like Heroku, has no persistent local file storage. Your instance is ephemeral and can be recycled at any time, and files on the filesystem do not persist across instances.
You might be able to fix this by using the persistent Elastic File Storage, but that would be a bad idea; latency would probably be horrible. Use a proper database via Amazon RDS.
Upvotes: 1