I'm trying to connect my Django Elastic Beanstalk to my RDS MySQL. My Django works with my RDS MySQL through localhost, but when trying to upload my Django to Elastic Beanstalk I get "failed to deploy application" and AWS shows errors (below). My project has mysqlclient in requirements.txt, like here:
https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-rds.html
According to that page, that should be enough. I've of course tried to search for similar questions but haven't had success so far. I've noticed that many questions refer to needing a packages.config file inside .ebextensions, I tried many of those suggestions without success. Is that the problem? Why wouldn't that be mentioned on the AWS page?
× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [16 lines of output]
/bin/sh: mysql_config: command not found
/bin/sh: mariadb_config: command not found
/bin/sh: mysql_config: command not found
Traceback (most recent call last):
File "<string>", line 2, in <module>
File "<pip-setuptools-caller>", line 34, in <module>
File "/tmp/pip-install-r0dz9d2g/mysqlclient_f2b5c53e43a648c284b06f7af63d9855/setup.py", line 15, in <module>
metadata, options = get_config()
File "/tmp/pip-install-r0dz9d2g/mysqlclient_f2b5c53e43a648c284b06f7af63d9855/setup_posix.py", line 70, in get_config
libs = mysql_config("libs")
File "/tmp/pip-install-r0dz9d2g/mysqlclient_f2b5c53e43a648c284b06f7af63d9855/setup_posix.py", line 31, in mysql_config
raise OSError("{} not found".format(_mysql_config_path))
OSError: mysql_config not found
mysql_config --version
mariadb_config --version
mysql_config --libs
[end of output]