- Newest
- Most votes
- Most comments
Hello.
Is it possible to deploy as per the following documentation and still use it?
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html
@ Riku_Kobayashi
The link works until I use the MySQL.
I can deploy without any problem when I use the following settings:
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": BASE_DIR / "db.sqlite3",
}
}
BUT when I try to use the following settings and try to deploy using EB CLI, I get a "502 Bad Gateway nginx" error. Interestingly, the following settings work on my localhost without any problem.
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': '<actual_database_name>',
'USER': '<actual_user_name>',
'PASSWORD': '<actual_database_password>',
'HOST': 'mysql-rdbms.blah-blah.us-west-2.rds.amazonaws.com',
'PORT': '3306',
}
}
As soon as I try to use the MySQL part, I cannot deploy.
Also please note that there is no mention of MySQL in the following document: https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html
So, my problem is - there is no MySQL Package on AWS Elastic Beanstalk EC instance and I do not find a way to install it on AWS Elastic Beanstalk EC instance.
You could try the follow yum package settings, the package names seem to be changed every now and again.
packages:
yum:
python3-devel: []
mariadb-devel.x86_64: []
mariadb.x86_64: []
I am also stuck on the same issue, but just noticed the difference in your .config file
Relevant content
- asked 6 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated 14 days ago
- AWS OFFICIALUpdated 9 months ago
- AWS OFFICIALUpdated a year ago
Thanks for the reply. I think you need to list the packages to be installed in requirements.txt as described in this document. https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-rds.html