Skip to main content

Logo placeholder # django-zappa Build Status #### Serverless Django with AWS Lambda + API Gateway

django-zappa makes it super easy to deploy Django applications on AWS Lambda + API Gateway. Think of it as “serverless” web hosting for your Django apps. See in action here!

That means:

  • No more tedious web server configuration!

  • No more paying for 24/7 server uptime!

  • No more worrying about load balancing / scalability!

  • No more worrying about keeping servers online!

  • No more worrying about security vulernabilities and patches!

django-zappa handles:

  • Packaging projects into Lambda-ready zip files and uploading them to S3

  • Correctly setting up IAM roles and permissions

  • Automatically configuring API Gateway routes, methods and integration responses

  • Deploying the API to various stages of readiness

Awesome!

This project is for Django-specific integration. If you are intersted in how this works under the hood, you should look at the Zappa core library, which can be used by any WSGI-compatible web framework.

Installation

$ pip install django-zappa

Configuration

There are a few settings that you must define before you deploy your application. First, you must have your AWS credentials stored in ~/.aws/credentials’.

Next, define a ZAPPA_SETTINGS setting in your local settings file and map it to an S3 bucket (that must already be created).

ZAPPA_SETTINGS = {
    's3_bucket': 'your-bucket-name'
}

You must also create a local file called zappa_settings.py. This file will be used as your server-side settings file. Specifically, you will want to define a new SECRET_KEY, as well as your deployment DATABASES information.

Basic Usage

Once your settings are configured, you can package and deploy your Django application to an environment called ‘production’ with a single command:

$ python manage.py deploy production
Deploying..
Your application is now live at: https://7k6anj0k99.execute-api.us-east-1.amazonaws.com/production

If your application has already been deployed and you only need to upload new Python code, but not touch the underlying routes, you can simply:

$ python manage.py update production
Updating..
Your application is now live at: https://7k6anj0k99.execute-api.us-east-1.amazonaws.com/production

If you want to invoke Django management commands on the remote Zappa instance, you simply call the ‘invoke’ management command locally:

$ python manage.py invoke production check
System check identified no issues (0 silenced).

TODO

This project is very young, so there is still plenty to be done. Contributions are more than welcome! Please file tickets before submitting patches, and submit your patches to the ‘dev’ branch.

Things that need work right now:

  • ORM/DB support

  • Testing

  • Route53 Integration

  • SSL Integration

  • Package size/speed optimization

  • Fix the “hot-start” problem

  • Feedback

  • A nifty logo

  • Real documentation / website!

Metadata

Release files for django-zappa 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-zappa 0.2.0
File Size Uploaded Provenance Actions
django-zappa-0.2.0.tar.gz 7.2 kB Without provenance Details for django-zappa-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for django-zappa 0.2.0
File Interpreter ABI Platform Actions
django_zappa-0.2.0-py2-none-any.whl Python 2 none any Details for django_zappa-0.2.0-py2-none-any.whl

Total release size: 17.5 kB

Release files / django-zappa-0.2.0.tar.gz

Download URL django-zappa-0.2.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
dd6935b4ce5f9e710412b81f07b91de4a1538342f4a6b626be7fd92dc4592dd8
BLAKE2b-256 checksum
How to use checksums
21230bdd79a982bc4d8a3b2f42fef22d0dc76be8fa08b23a724088c0359c04e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / django_zappa-0.2.0-py2-none-any.whl

Download URL django_zappa-0.2.0-py2-none-any.whl
Size 10.3 kB
Tags Python 2
SHA-256 checksum
How to use checksums
04ddf925b5a4c57e44942a9b5bc85594d569e4521c649da4add26fd0bdd120ad
BLAKE2b-256 checksum
How to use checksums
e7126b98ba56e285db2e8d3707bbf4c0233e189ef619253a86a94cb1868711a1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for django-zappa 0.2.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

0.0.1

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page