This AWS orchestration service allows you to be agile!

Arash Kaviani
Jun 12 · 4 min read

It is so common that a data scientist needs to create a web dashboard application or a working proof of concept. Like most of the things data scientists do, it should be done in an agile and neat way. In my last project, I was asked to create a dashboard for a system dynamic model to be used in a workshop as a proof of concept. In that work, I created a dashboard using Django with diagrams visualised using plotly. Django has various apps for dashboard development such as Django-controlcentre, Django-dash, Django admin tools and so and so forth. You could find a list of them in this link.

Maintenance and deployment are always of main concern when you develop an application in an agile way. Practically, due to the nature of these types of works, there is not enough amount of money to be spent on deployment and maintenance. Therefore, you need a solution that allows you to deploy your application very quickly and let it go under use with the minimum maintenance!

AWS Elastic Beanstalk provides you with this solution. It is an orchestration service that allows users to deploy their applications very quickly. It is an orchestration service because it comes with connectivity and integration to many other AWS services such as EC2, S3, Simple Notification Service (SNS), CloudWatch, autoscaling, and Elastic Load Balancers. It also provides access to various AWS services such as Relation Database Services (RDS) that provides users with fully managed database services. It is fast and straightforward while it takes care of load balancing as well as scaling your application up and down automatically.

Figure 1: EB benefits. Source: AWS

You need to create an application in Elastic Beanstalk. Then you can create different environments such as development, test and production very quickly in that application. Figure 2 illustrates how Elastic Beanstalk is conceptually working. Everything is fully managed by Elastic Beanstalk, which makes its use an absolute charm! Perhaps, you only need to get yourself familiar with it initially. After that, it is quite straightforward.

Figure 2: Process overview of using Elastic Beanstalk. Source: AWS

In my case, I only needed to install EB CLI and use to initialise, create and deploy my application following the steps given in this link. It goes without saying that you may deal with some issues down the path you are creating your environment. I mention some of the common issues that you may need to cope with as follows:


More information:

eb init -p python-3.6 sd-dashboard
WSGIPath: system_dynamic_dashboard/
STATIC_URL = '/assets/'
STATIC_ROOT = os.path.join(BASE_DIR, 'assets')
# and then in django.config, you should have something similar to:
WSGIPath: system_dynamic_dashboard/
/assets/: "assets/"

The database is created as part of the “AWS managed Relational Database Service (RDSA)” and you can do further configuration there. If you want to use the same database during the development, you need to make sure that the right port accesses has been given to the instance. This can be done in the AWS RDS console where you pick your database and add the required “Security group rules”. You need to have the following configuration in

if 'RDS_HOSTNAME' in os.environ:
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': os.environ['RDS_DB_NAME'],
'USER': os.environ['RDS_USERNAME'],
'PASSWORD': os.environ['RDS_PASSWORD'],
'HOST': os.environ['RDS_HOSTNAME'],
'PORT': os.environ['RDS_PORT'],

Following link also elaborates on the deployment of a Django application into EB:

Arash Kaviani

Written by

Assisting businesses to become insight-driven!