Running Django apps on AWS Fargate with a serverless RDS

Originally published on eve.gd on 19 May 2022, last updated 6 September 2026.

Read this post on the web (with images, PDF and citation details)

There are several tutorials out there on how to get Django apps dockerized and deployed onto AWS Fargate. None of them worked for me. So I have put together a project demonstrating how to do this. It’s available on Github.

a project demonstrating how to do this

The scenario I wanted to create was something like this:

I wanted the infrastructure to have:

There were loads of “gotchas” along the way. For instance, getting two containers to run and interact with each other on the same network interface. The fact that you can’t use docker-compose.yml “commands” to start the container. The load balancer wouldn’t allow an HTTP target group for an HTTPS listener in extant modules. Getting the database to be accessible proved to be a networking pain. Setting the database password to a randomly generated string didn’t work. The list goes on.

In any case, the project now seems to work!

References

This reference list has been generated, in many cases, through an automated process and may therefore contain errors or incomplete metadata. It is provided purely as assistance for finding the items mentioned within this post.

1. ‘GitHub - MartinPaulEve/django-fargate’, GitHub <https://github.com/MartinPaulEve/django-fargate>

https://github.com/MartinPaulEve/django-fargate