Getting started with Django on Amazon Web Services [closed] Getting started with Django on Amazon Web Services [closed] python python

Getting started with Django on Amazon Web Services [closed]


There is nothing "special" with EC2 here. It just provides bare (or generally preconfigured from custom AMI) system instance - you have access to whole virtualized system, so you can safely break things on your own. Think about it as a specific VPS.

You have to prepare deployment by yourself, which is not so difficult - just follow the documentation. I'd advice to run with basic linux distro and add needed stuff than to rely on some preconfigured image. As for you questions:

  1. You need to do two things: setup your instance (accounts, needed software, other custom setup, so some linux administration guide should be handy) and prepare django app deployment (deploy python code, hook up to web server). For the latter, general deployment instructions for django can be applied here ( http://docs.djangoproject.com/en/dev/howto/deployment/ ).

  2. Start with AMI with your favorite linux distro, and then add necessary software from it's repository.

  3. Mount and use EBS as soon as possible for all your data. When rebooted, EC2 instance will wipe out all it's data, so be prepared for this. Do system snapshots to AMI to have quick recovery on failure.

Yes, you can deploy several applications on one instance, but mind that EC2 instance is virtualized (with quite high "virtualization tax" imo, especially for smaller instances), so you might run into general performance problems. Assume that you'd need migrate to bigger instance/multiple instances after some time.

Virtualenv should be your default deployment tool. Yes, you can use it here too.


You can follow the official documentation of setting up Amazon ec2 instance: http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-launch-instance_linux.html

You should start with an AMI that you are familiar with. For example, if you use Ubuntu, you can just use one of the Ubuntu AMI in the recommended page. I didn't use the BitNami server and my Django site is deployed smoothly.

If you are using Apache server, just follow the instructions on the official Django doc:https://docs.djangoproject.com/en/1.5/howto/deployment/wsgi/modwsgi/

I tried quite a few blogs but as you said, they are outdated. Just use the official docs and it will save you a lot of time.


This repo is meant to address exactly this issue - provide a reference implementation for a basic django project that can be deployed onto AWS ElasticBeanstalk.

https://github.com/pushkarparanjpe/django-awsome

It has:

  • Static assets
  • DB back-end
  • django contrib Admin

Just configure your EBS env, clone the repo and deploy!