title: Setting Up Django and PostgreSQL on two different EC2 instances
body: <p>Hello StackOverFlowers :) up until now I have been running my Django back end and my PostgreSQL database on the same micro EC2 instance. </p>
  
  <p>I've set up two EC2 instances, one with my django back end and the other instance with my PostgreSQL database on which I use pgadminII to manage it. Both instances use the same security group and have all the same ports open. I've attached an Elastic IP to my Django instance and another Elastic IP to my Postgresql instance. </p>
  
  <p>Now I know in the settings.py I need to change the 'HOST' to the address of the PostgreSQL instance. But I'm not quite sure what to put. Do I put the Elastic IP of the PostgreSQL instance? </p>
  
  <p>I've done some research and many sources say I need to put in the internal server IP address of the PostgreSQL instance. If that's the case how can I find the internal server IP address and input that into the 'HOST'? I've copied and pasted the settings.py code below for clarity. </p>
  
  <pre><code>DATABASES = {
  'default': {
  'ENGINE': 'django.db.backends.postgresql_psycopg2', 
  'NAME': 'django_db', 
  'USER': 'django_login',
  'PASSWORD': 'password', 
  'HOST': '', # Set to empty string for localhost. Not used with sqlite3.
  'PORT': '', # Set to empty string for default. Not used with sqlite3.
  }
  </code></pre>
  
  <p>Thanks for the help, if I'm not clear enough, please comment and let me know so that I can make it clearer for you and for others :)</p>