Guides / Django on AWS: Lightsail vs ECS vs App Runner, and what Django Cloud picks
Django on AWS: Lightsail vs ECS vs App Runner, and what Django Cloud picks
AWS has several ways to run a container, and the names do not help. For a small or medium Django app, the real choice comes down to how much of the setup you want to own. Here is a plain comparison of the three services people ask about most.
Amazon Lightsail container services
- What it is: you pick a size (for example Nano or Small) and a number of copies. AWS gives you an HTTPS address and a load balancer.
- Pricing: a fixed monthly price per size, which makes the bill easy to predict.
- Good for: a web app, an API, a small team.
- Limits: fewer knobs. Advanced networking and fine-tuned scaling are not its job.
Amazon ECS (usually with Fargate)
- What it is: AWS's general container orchestrator. You describe tasks and services, wire up a load balancer, a network and permissions, and ECS runs them.
- Pricing: you pay for the CPU and memory your tasks use, plus the load balancer and other pieces around it.
- Good for: larger systems, many services, strict networking, auto scaling.
- Limits: a lot of setup. A working Django deployment usually means infrastructure code (Terraform or CloudFormation) and someone who maintains it.
AWS App Runner
- What it is: a simpler service where you point at a container or a repository and AWS builds and runs it.
- Pricing: based on memory and CPU while it handles requests, plus charges for memory when idle.
- Check first: confirm in the AWS documentation that the service is open to new customers in your region before you design around it.
How to choose
- One Django app and a database, predictable bill, small team: Lightsail.
- Many services, custom networking, auto scaling, a platform team: ECS.
- You want the simplest possible start and the service is available to you: App Runner.
Whichever you pick, you still need
- A build that makes a container image of your project.
- A managed Postgres database, with backups.
- Migrations that run before the new version takes traffic.
- Secrets that are not stored in the repository.
- A rollback you have tried at least once.
That list is the real work, and it is the same on every service. A platform on top takes it off your hands, while the infrastructure stays in your AWS account.
Or skip it
Django Cloud runs your app on Amazon Lightsail container services in your own AWS account, and handles the build, migrations, certificate and rollbacks around it. You pick a size and the number of copies.
pip install djangocloud-cli
djangocloud deploy
Free plans are available for students, AWS Activate startups, open-source, non-profit and research projects. See how Django Cloud compares with other ways to host Django.
Django is a registered trademark of the Django Software Foundation. Django Cloud is not affiliated with or endorsed by it. Found a mistake in this guide? Tell us and we will fix it.