Setting up a Django Project
1. Create and activate a Virtual environment for this Django project (ignore if already have one)
Note: You can refer to the application code in the GitHub repository
python3 -m venv myvenv
source myvenv/bin/activate
2. Install all the requirements for this project and store the requirements in requirements.txt, if you didn’t have requirements documented, you can run the below command to get installed requirements details into a file.
pip freeze > requirements.txt
3. Add Zappa to requirements
echo "zappa" >> requirements.txt
4. Make sure all the requirements are installed, by running the below command.
pip install -r requirements.txt
How to Deploy Django Application in AWS Lambda?
Django is a Python web framework that makes it easy to build web applications quickly and securely. It has a large and helpful community that provides support and contributes to its development.
AWS Lambda is a serverless computing platform that runs your code in Docker containers, provides us with the best possible speed, and there is a number of third-party apps, and tools that make Lambda usage much easier, in this tutorial we gonna use one such tool.