Published May 19, 2022 | Version v1 | https://doi.org/10.59348/k6z7j-a6z38

Running Django apps on AWS Fargate with a serverless RDS

  • 1. ROR icon Birkbeck, University of London

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](https://github.com/MartinPaulEve/django-fargate). It's available [on Github](https://github.com/MartinPaulEve/django-fargate). The scenario I wanted to create was something like this: ![Infrastructure](/images/containerized_django_on_aws.png) I wanted the infrastructure to have: * Load balancing * SSL (with termination at the load balancer) * Serverless auto-scaling * Serverless database * Containerized Django 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!

Running Django apps on AWS Fargate with a serverless RDS was originally published by Martin Paul Eve at Martin Paul Eve on May 19, 2022.

Additional details

Description

There are several tutorials out there on how to get Django apps dockerized and deployed onto AWS Fargate.

Identifiers

UUID
092681b8-f655-4bc4-ad6e-3e7a696c5c4f
GUID
https://doi.org/10.59348/k6z7j-a6z38
URL
https://eve.gd/2022/05/19/running-django-apps-on-amazon-ecsecr-using-fargate

Dates

Issued
2022-05-19T17:55:58
Updated
2022-05-19T17:55:58