简体   繁体   中英

Django running under python 2.7 on AWS Elastic Beanstalk

According to the docs, AWS Elastic Beanstalk supports Python 2.6. I wonder if anyone has set up a custom AMI using the EBS backed 64 bit Linux AMI to run django under Python 2.7 on the beanstalk? While most aspects of a set up under 2.7 will probably be straightforward using virtualenv or changing the symlinks, I'm worried about the amazon build of mod_wsgi. I understand that depending on how mod_wsgi has been compiled there may be issues with running it in combination with Python 2.7. I also wonder if there will be any postgreSQL issues...

This blog post seems interesting:

Getting a Python 2.7 project running on Elastic Beanstalk

The author also provided a sample project for testing:

https://github.com/leetreveil/elasticbeanstalk-python27

To get around mod_wsgi limitation, you can deploy your application under your own wsgi container like uWSGI and add configuration to apache to serve as a reverse proxy for your WSGI container.

You can use container_commands to place your apache configuration files under /etc/httpd/...

Today (Nov 8, 2013), as I checked AWS support Python 2.7 AMI. Even though, documentation is still not updated properly. Please try to use eb CLI tool and then you can find the below AMI options.

17) 32bit Amazon Linux 2013.09 running Python 2.7
18) 64bit Amazon Linux 2013.09 running Python 2.7

No more hassle to use Python 2.7! :)

In the end I built mod_wsgi using Python 2.7. The documentation was easy to follow: http://code.google.com/p/modwsgi/wiki/QuickInstallationGuide

Recently, however, I switched from the Amazon Linux AMI to an official ubuntu AMI: https://help.ubuntu.com/community/EC2StartersGuide

It is so easy to add instances to a load balancer and connect to an RDS using an ubuntu ami I didn't see the need to persist with the Amazon Linux AMI and the beanstalk, which I found rather restrictive.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM