0 votes
1 view
in AWS by (19.2k points)

First time using AWS services with Django.

Was wondering how to configure the Django app running in an EC2 instance to a Postgres database in RDS?

the EC2 is running ubuntu

Any special configuration required?

1 Answer

0 votes
by (44.6k points)

Before starting off with the normal migration part provided in this official documentation, make sure that your RDS instance is available and accessible from your EC2 instance.

The modify settings.py file in the DATABASES section like this:


'default': {

    'ENGINE': 'django.db.backends.postgresql',

    'NAME': '<name defined upon RDS creation>',

    'USER': '<username defined upon RDS creation>',

    'PASSWORD': '<password defined upon RDS creation>',

    'HOST': '<this can be found in "Endpoint" on your RDS dashboard, exclude the ":" and the port number>',

    'PORT': '5432',



Then, continue to migrate as suggested by the documentation.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !