Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploy Django API application with AWS Lambda

Is it a way / tutorial how to deploy / convert Existing Django Application (I am using django-rest-famework) for APIs to be available via API Gateway and executed by AWS Lambda functions?

I see package zappa, however I want to avoid it....

like image 864
bensiu Avatar asked Dec 27 '16 04:12

bensiu


People also ask

Can I run Django on AWS Lambda?

In order to deploy a Django project on AWS Lambdas you should prepare your AWS infrastructure. There is a list of AWS services I use for my Django project: Lambdas to run our wsgi application. API Gateway to handle HTTP request and send them to Lambdas.

What is the best way to deploy Django?

Django websites can be deployed on any number of hosting providers. The first choice is deciding whether to use a Platform-as-a-service (PaaS) option or a virtual private server (VPS). A PaaS is an easier albeit more expensive option that can handle many deployment issues with minimal configuration.


1 Answers

Yes. I did that and it worked out quite fine. If you have any large files (a neural network in my case) you'll have to store them on s3 and load them after the lambda warms up, because there's a quite strict size limit for the project.

Here's a nice tutorial https://medium.com/@apcelent/how-to-deploy-django-app-on-aws-lambda-53e9c4b137e7

like image 59
Jura Brazdil Avatar answered Sep 23 '22 01:09

Jura Brazdil