
Master prerequisites in Django and AWS, including EC2. Deploy a containerized Django app with Docker and Nginx to Amazon ECS, using S3 for static files and RDS for the database.
Meet the prerequisites with HTML, CSS, JavaScript basics and Django proficiency. Use a Windows 10 or Windows 11 device; Apple devices won't work due to tokenization.
Ask questions in the course Q&A forum and get help from the instructor or fellow students; try solving issues yourself first, then seek support when needed.
Structure your thought process by taking the course one step at a time, focusing on progress over time, and avoiding burnout with small, consistent daily efforts.
Review the course resources, focusing on the project code zip file and the downloadable PDF lecture slides, which are attached in the resources section.
Install Python 3.11.1 on Windows and add python.exe to the path, then install Visual Studio Code and set up essential extensions like Plastic, Prettier, Auto Rename Tag, and Django Support.
Set up a Django project on Windows by creating a development folder, creating and activating a virtual environment, installing Django, and starting the project to run on localhost.
Configure the Python interpreter in Visual Studio Code on Windows by selecting the interpreter path from your virtual environment to ensure all pip packages, such as django-environ, are recognized.
Discover how to manage a Django virtual environment in Visual Studio Code, including whether to move or recreate the venv and how to activate and verify with pip list.
Set up a Django app by creating a url, template, and view, run migrations, start the app with django-admin startapp, and add it to installed apps before running server.
Learn to set up a basic Django template and view by configuring the templates directory in settings, creating index.html, and wiring URLs and views to render the home page.
Configure static files in a Django project by setting the static URL and directories in settings.py, creating a static folder, and loading static in templates to serve CSS and JavaScript.
Replace the index.html in the resources folder with the provided template and apply a boot swatch bootstrap theme to style page, updating the nav bar and linking style.css and app.js.
Set up the basic url and view structure for a Django app, creating register, login, dashboard, and user logout views, wiring them in urls.py with named routes and placeholder functions.
Build Django user registration by creating a user creation form (username, email, password), a register.html, and a registration view that validates input and redirects to the dashboard.
Master Django user authentication by building a login page with a login form that inherits Django's authentication form, using authenticate and login, and redirecting to the dashboard.
Wire the logout route in urls.py, implement auth.logout in views.py, and redirect to the home page via the user log out route.
Create and render a simple dashboard page with dashboard.html and wire its view. Configure redirects for login and register, and update index.html navigation with links.
Test and secure a basic django app by registering and logging in, protecting the dashboard with login_required, and verifying user sessions before moving to styling and cloud storage.
Learn to create your AWS account using the free tier, verify email, fill in address details, enable multifactor authentication, and add a card on file, guided by the included resources.
Create a designated AWS budget using a custom cost budget, set a monthly $20 limit, scope all services, and enable an 80% email alert.
Learn how identity and access management governs user access with IAM users and groups, attach permission policies, and use access keys and account aliases for secure authentication.
Create an IAM user and a developers group, attach administrator access and change password policies, and enable programmatic and console access via access keys and passwords.
Create an account alias to generate a unique sign-in URL for your IAM user on AWS, and save the URL, credentials, and MFA setup details securely.
Secure AWS accounts by enabling MFA for IAM and root users. Install an authenticator app such as Google Authenticator, scan the QR code, and enter two consecutive MFA codes.
Generate AWS access keys to enable programmatic access for syncing Django static files to an S3 bucket. Store keys securely and do not share them.
Attach identity and access policies for ecs and ecr by adding Amazon eks full access and Amazon ec2 container registry full access in the iam dashboard to manage docker containers.
Install the AWS CLI on Windows using the MSI installer, verify the installation, and configure credentials with aws configure by entering your access key, secret key, region, and json output.
Create unique Amazon S3 buckets to store objects like images and documents, then apply bucket policies and IAM permissions to control access for backup, disaster recovery, and hosting static website.
Create and configure an Amazon S3 bucket to host static files, enable public read access, and apply a get object bucket policy using the policy generator.
Integrate S3 with your Django app by installing Django storages and Boto3, configuring AWS credentials and bucket, and using collectstatic to push static files to S3.
Explore Amazon Relational Database Service, a managed relational database service, and learn how to create your own databases using engines like Postgres, SQL, and Oracle.
Configure a production Postgres database for a Django app by updating settings to use django.db.backends.postgresql, adding database credentials, and installing psycopg2-binary for Amazon RDS.
Create a Postgres database in Amazon RDS for a Django app, configure the engine and free tier, set security, connect via endpoint, and run migrations to access the admin page.
Learn how Route 53 registers domains, maps domain names to IP addresses via dns records, and routes traffic with simple, weighted, failover, and latency policies.
Search for and register a domain with Route 53, review pricing and contact info, complete checkout, and verify domain status and hosted zone setup.
Master Amazon certificate manager (ACM) to create and deploy free SSL/TLS certificates, enabling https and secure websites, and recognize the address bar lock indicator.
Learn to provision and assign a free SSL certificate with AWS Certificate Manager and Route 53, validate via DNS records, and configure root and www domains for your Django app.
Style Django forms using crispy forms with bootstrap four to create cleaner, beautifully spaced inputs. Configure settings.py, load crispy forms tags, and apply crispy fields to register and log in.
Discover how Docker packages applications into portable containers that run on any machine, then build, push, and run Docker images for Python, Node.js, or C++ apps.
Install and set up Docker Desktop through a hands-on activity, download Docker Desktop, launch the wizard, accept permissions, and pin Docker to the taskbar for quick access.
Examine docker desktop to explore containers, images, and volumes, accept the agreement, start docker engine, learn about binding mounts, docker compose, and resources for NodeJS, Python, Java, and C sharp.
Prepare docker deployment by installing gunicorn and psycopg2-binary, generate a requirements.txt with pip freeze, and ensure psycopg2 is replaced by psycopg2-binary for a smooth nginx reverse proxy setup.
Learn to create two docker files that build images: a Python-based image for a Django web app and an Engine X reverse proxy image.
Create a Django Docker image using a Python-based Linux base, install dependencies from requirements.txt, copy project files, and run with Gunicorn on port 8000 for Nginx reverse proxy.
Create a dockerignore file to exclude your virtual environment folder (venv) from Docker builds, ensuring a clean image in this optional hands-on activity.
Explore Nginx as an open-source production web server, reverse proxy, and load balancer; learn its event-driven, scalable design that handles hundreds of thousands of concurrent connections with strong security.
Explore what a reverse proxy is and how Engine X acts as a reverse proxy to fetch resources from a server on behalf of the client, improving web app performance.
Create a Dockerfile for an nginx image to run a Django app behind a reverse proxy. Configure nginx.conf with upstream and proxy settings and copy it into the container.
Optimize container performance by configuring timeout to five and threads to ten to prevent container timeouts in a containerized Django app.
Run docker containers locally with docker compose up to launch Django and Nginx containers, view logs, and verify the app at localhost before deploying to production.
Learn Docker resource cleanup by stopping and deleting containers, removing images, and running Docker system prune to clear unused networks, dangling images, and build cache for a fresh start.
Manage docker containers on aws by using Amazon Elastic Container Registry for images, run with Amazon Elastic Container Service or fog gate, and orchestrate with Amazon Elastic Kubernetes Service.
Discover how to run Docker containers on Amazon ECS by using task definitions, services, and clusters, set a desired capacity, and redeploy updated task definitions.
Prepare deployment by configuring Django settings and nginx for ECS: set debug to false, define allowed hosts and trusted origins, manage DNS and SSL, and set server_name in nginx.
Configure environment variables for a Django app by creating a .env and loading secret key, database, and S3 credentials in settings.py with os.environ.get, then inject them into ECS task definitions.
Move the dot env file outside the project, remove it from the Docker image, and manually inject environment variables at the ECS task definition for production deployment.
Stop the running server and run docker system prune to remove containers, networks, images, and build cache, preparing a clean slate before creating a production image for development.
Create two production Docker images for a Django app behind an Nginx reverse proxy by setting linux/amd64 platform, building with Docker Compose, and confirming readiness in Docker Desktop.
Push your docker image to Amazon ACR without retrying issues. Ensure a stable internet connection, disable VPNs or proxies, and check antivirus, firewall, ISP restrictions, and network configurations.
Learn to push docker images to amazon ecr by creating django and nginx repositories, authenticating with aws credentials, tagging images, and pushing updates using the cli.
Configure an application load balancer and Route 53 DNS records to expose a Django app on EC2, enable HTTPS termination with an ACM SSL certificate, and redirect HTTP to HTTPS.
Create a security group to enable bidirectional communication between the application load balancer and the ECS container by allowing inbound TCP from the load balancer.
Define a task definition in Elastic Container Service to link Django app container with nginx proxy, configure CPU and memory, map port 80, and inject env vars from ECR images.
Create and configure an ecs cluster with ec2 instances, auto scaling, and an on-demand provisioning model, using amazon linux 2023 and t3 micro, with careful subnet and security group setup.
Delete a failed cloud formation stack, create an ecs cluster and service, configure an application load balancer with nginx for the django app, and verify running tasks and ec2 instances.
Welcome! I'm here to help you to master the basics of deploying a Django web application to Amazon Elastic Container Service (ECS) whilst utilizing Nginx and Docker.
-- Please read carefully --
This course is primarily intended for individuals who have a basic knowledge of Django and AWS. Knowledge on Docker would be helpful, but it isn't mandatory for this course.
To put it simply, if you have some background in Django and AWS and want to learn about how to deploy your web application then this is definitely the course for you!
I want to help YOU deploy your Django web app to AWS.
The Deploy a Django web app with Nginx and Amazon ECS course has been structured in a simple and logical order. Everything that has been designed from the styling to the graphics and topics covered is crafted with the absolute duty of care towards the student.
The main focus of the course is to teach you how to deploy your Django web application to Amazon ECS with Docker and Nginx.
In this course we will NEED to purchase a domain name from AWS Route 53.
We will only focus on deployment and NOT delve into making use of any automation tools or focus on intricate use cases. This includes the AWS CI/CD tools for continuous integration and delivery.
You will learn how to utilize several AWS services such as Amazon S3, Amazon RDS, Route 53, Certificate Manager, Elastic Container Service (EC2 - launch type) etc.
You will also learn how to attach a domain name and SSL certificate to your web application.
It is mixed with theory and practical hands-on demonstrations.
The course is structured in a logical and cohesive way - not just random slides plastered everywhere.
It starts off very simple and then builds on gradually throughout the course.
You will also learn about the basics of Docker and containerization
This course is jam-packed with lecture slides, PDF walkthroughs, code snippets/references and comes along with the full project source code - as a zip file.
All 150 + slides are available as a downloadable PDF.
The Deploy a Django web app with Nginx and Amazon ECS course is a highly practical course and allows you to apply your knowledge:
There is a wealth of hands-on lectures throughout this course.
You will be able to deploy your Django web application by containerizing it.
We will configure Nginx as a reverse proxy and bind it to our Django application with Gunicorn
Your instructor:
My name is Arno Pretorius. I'm a qualified IT teacher who has taught programming both in-person and online. My main passions are teaching and technology, so I thought why not just combine the best of both worlds to create something truly amazing and valuable. Over the years, I have created and deployed many real-world Django-based applications, including a job portal for university graduates and an exclusive social network.
I'm a Software developer, an AWS Solutions Architect and Developer associate. I have a keen interest in cloud computing, web development and everything that relates to programming and technology.
So, let's go and become fluent in Django deployment, along with an extra service or two.
Trust me you are in good hands!
This course also comes with:
- 6.5 hours of on-demand video
- Full lifetime access
- A Udemy certificate of completion
- Several downloadable resources
- Access on mobile and TV