Serverless Django with Zappa

Learn how to migrate your Django application to a serverless environment hosted by AWS Lambda.

 

What You Will Learn

How to migrate your Django project to the AWS serverless environment

Adapt your code to changes necessary for running in the cloud

How to setup a reliable and consistent local development environment for serverless projects

How to setup and connect to a hosted RDS database

Learn about setting AWS IAM permissions for serverless projects

How to map a custom domain name to your Django project

Effectively serve Django static files via S3 or AWS Lambda

How to navigate the AWS Console to host multiple domain names

Learn about setting up a secure network environment using AWS VPC

Whether you are a solo developer working on your next startup idea or a team of folks working with Django, this course shows you the way to simplify your operations overhead while saving money. The open source Zappa utility paves the way to migrate your Django application away from old-school servers and onto the AWS Lambda serverless platform. It's almost like having your own private Infrastructure team!

No need to watch for OS security patches or tweak Apache settings -- just focus on delivering value to your users. All this with minimal changes to your Django application. Leverage the power of AWS to rapidly respond to spikes in user traffic, while saving money by only paying for the web requests actually needed.

For folks ready for serverless Django, this course covers:

  • Which Django apps are best to migrate and how to prepare them
  • Configuring a generic and portable development environment easily set up by new developers in minutes
  • Deploying and updating your code to AWS Lambda
  • Best practices in serving Django static files
  • Leveraging AWS services to secure your site with HTTPS and your own custom domain name
  • Learning how to configure a secure network environment in AWS VPC
  • Connecting your Django application to a hosted RDS database

All this while leveraging the AWS Free Tier. While there are some lessons that may have additional cost to complete (e.g. bring your own domain name), the vast majority of this course will be using the AWS Free Tier and won't cost anything.

It's taught by Edgar Román. I was introduced to Django in 2009 and I consider it my go-to web framework. With continuous support from a vibrant community in addition to an incredibly rich ecosystem, I would be hard pressed to find another framework that matches up.

I've been using Zappa to host my Django applications for several years now, and I have found no other solution that is as powerful and cost-effective as serverless Django hosting on AWS -- especially for the solo developer working to get a product to market.

I hope you enjoy this course and harness the power of serverless Django with Zappa in your projects!

Course Content

6 modules28 lessons2h 24m total

Introduction

4 lessons 9m total

About this class

Serverless Django with Zappa Course Overview

INTRODUCTION

3:25 minutes

Why Serverless?

Let's explore what Serverless is and isn't

INTRODUCTION

1:20 minutes

About the Author

A bit about Edgar Román

INTRODUCTION

1:20 minutes

Class Details

And code download links!

INTRODUCTION

3:53 minutes

Getting Started

4 lessons 24m total

Setting up AWS

We establish the necessary AWS credentials

LESSON

4:34 minutes

Setting up your local system

Let's create a reliable development environment

LESSON

10:37 minutes

Creating a Django app

A simple Django project to get started

LESSON

8:34 minutes

Activating the Environment

How to get your local system ready

LESSON

1:12 minutes

Dive into Zappa

3 lessons 20m total

Zappa Init

Now we set up our Zappa environment

LESSON

6:03 minutes

Our First Deployment

Ready to get into the cloud?

LESSON

7:16 minutes

Some Considerations

Serverless projects sometimes need changes

LESSON

7:19 minutes

Hosting static files

5 lessons 17m total

What are static files?

Serving static files is different in Serverless

LESSON

2:44 minutes

Static file options

A brief overview of two solutions

LESSON

3:09 minutes

Using WhiteNoise for static files

Serve static files directly from your project

LESSON

3:15 minutes

Using S3 for static files

Serve static files from an S3 bucket

LESSON

6:40 minutes

LESSON

1:55 minutes

Custom Domain Names

4 lessons 16m total

About Custom Domain Names

Making your website link user friendly

LESSON

2:32 minutes

Activating your domain

Walk through of the necessary steps

LESSON

6:07 minutes

Not using AWS services

Some hints for those not using AWS services

LESSON

1:22 minutes

To WWW or not to WWW

The great debate

LESSON

6:47 minutes

Connecting a Database

5 lessons 25m total

Establishing Connectivity

Overview of database connectivity

LESSON

3:53 minutes

Your first RDS database

We walk through the AWS Console

LESSON

4:40 minutes

Testing the connection

Let's try to connect to the database

LESSON

7:37 minutes

Adding models to Django

Let's enhance our project a bit

LESSON

8:26 minutes

LESSON

1:05 minutes

Get Ready for Production

3 lessons 28m total

Overview

The importance of security

LESSON

6:23 minutes

Creating the network and database

Walking through the AWS Console

LESSON

11:50 minutes

Deploy your project securely

Into your secure VPC

LESSON

10:02 minutes

Your Instructors

edgar

Edgar Roman

Frequently Asked Questions

Who is this course for?

This course is for folks who are already familiar with Python and Django, but want to learn more about migrating to the AWS Lambda serverless platform

Is serverless the right step for my Django application?

Maybe. Most, but not all, Django applications are well suited to be serverless. Especially web sites that get moderate traffic (or less) and have usage that fluctuates over time

What do I need to complete the course?

You will need an Amazon Web Services account (or sign up for one) and optionally access to a custom domain name for your site. During the course, any overhead costs will be identified along with options for workarounds.

What if I need help?

You can ask us questions anytime through the community Discord channel or by sending us a message.

$39

$49

  • Learn about migrating your Django project to a serverless environment

  • Learn how to adapt your Django project to live in the cloud

  • See how to deploy into a secure network environment

OrGet this course and every newline Book and Guide with a newline Pro subscription for just $20/mo
  • 28 lessons (2h 24m)

  • 1 complete project

  • 1,177 lines of code

Serverless Django with Zappa

$39

$49