
The deployment process begins by developing the Django application and integrating it with AWS RDS (PostgreSQL) for database management. AWS S3 is configured to serve static files (like CSS and JS) and store user-uploaded media. To improve performance and manage traffic efficiently, NGINX is used as a reverse proxy to forward requests to the Django backend. Both the Django and NGINX components are containerized using separate Dockerfiles, and their images are built and pushed to AWS Elastic Container Registry (ECR). Next, an Application Load Balancer (ALB) is created and configured with appropriate listeners and target groups to handle incoming HTTP/HTTPS traffic. The ALB forwards these requests to an ECS cluster running on EC2 instances. These instances host and run the Dockerized Django and NGINX containers. NGINX, acting as the reverse proxy inside the container, routes incoming requests to the Django application. This layered setup ensures better control over traffic distribution and easier scaling as demand grows. To finalize the deployment, Route 53 is used to purchase and manage a custom domain. Alias records in the Route 53 hosted zone are created to point the domain to the ALB. An SSL certificate is provisioned through AWS Certificate Manager and validated using CNAME records, enabling secure HTTPS communication. Sticky sessions are enabled on the ALB’s target group to ensure users remain connected to the same instance during their session. This architecture offers high availability, scalable deployment, and a secure, reliable user experience.