Django (RestFramework) + AWS Cognito?

How do I make friends with the DRF and ASW Cognito?
Planning to do project on serverless (AWS lambda) DRF + Vue. Looked that there are AWS Cognito, I wanted his tie. But I have a few questions already in mind.

- The front login makes using DRF? Or he goes in Cognito, and then transmits the token in DRF? Which option is the better?
For DRF (Django) is there a good package or better using boto3 and using poker software to do?
- If I want to do two-factor auth, but don't want to use ASW SNS for the delivery of SMS, can I Cognito tie Twillio?

Well, a common question in the Django ASW lamdba. Plan to do through zappa. Does this approach the right to life? There will be many problems? And I realized that zappa will sigortal all in one lambda, and API Gateway all prokit on it, then if you go to a non-existent url, the API Gateway will miss the request in apku, and the AIC will return a 404, but the lambda will run, and will eat money. If so, how to deal with this?

Somehow a lot of questions turned out well, maybe something I learn new.
April 3rd 20 at 17:20
1 answer
April 3rd 20 at 17:22
A lot of letters, but!

For Serverless:
no Django because lambda is coming from request, and the routing is done on the api gateway. it is a functional programming consider
- look at Serverless Framework
- boto3 cool thing, but don't forget that this is just a wrapper for services
- zappa in the trash, she did not really know how, but deplot all unchecked in your account
- the problem will be if you need low latency because lambda has a cold start (can be reduced using a new feature)
- 404 in the API Gateway is done as ANY /{proxy+} -> lambda

In Cognito:
- to throw. If you are not ready to spend days and weeks to at least get something
look at Auth0
Thanks for the response.

no Django

Just want Django to push in the lambda, so I will not throw it away.
zappa in the trash

And then what to cook lambd-y? I don't need super-duper much, just to test.
the problem will be if you need low latency

No problem, of course, it was clear that it takes time to run
404 in the API Gateway is done as ANY /{proxy+} -> lambda

I do not quite understand. That is and will be, if you go to an invalid url (e.g. /polls/asasa), the API gateway will skip it in Django application, the application will adopt it, but it will give a 404 response. But the money will take during the work of the lambda? I'm interested in how not to allow such requests to pripisivati some configs in the API Gateway (the similarity in nGinx)? - Willy1 commented on April 3rd 20 at 17:25
Just want Django to push in the lambda, so I will not throw it away.

None of the basic features of Django is not needed in the lambda by the fact that it is stateless, and the routing is provided by api gateway. Everything else can be decidate packages

And then what to cook lambd-y? I don't need super-duper much, just to test.

I already gave a link to a serverless framework. This is the most easy

I'm interested in how not to allow such requests to pripisivati some configs in the API Gateway (the similarity in nGinx)?

no way. The API GW, there is no such functionality

I would also add that if you use Django then lambda will become useless decision by the fact that it will run extremely slow and, accordingly, will become VERY expensive - virginia commented on April 3rd 20 at 17:28
@Willy1, in General, Lambda is calculated that in one function will be the code base for a single operation. If you put the monolith there the path abruptly become easier and cheaper.

Not to mention the fact that Django will never get the original request from the user by the fact that lambda is a completely different object from another place - virginia commented on April 3rd 20 at 17:31

Find more questions by tags Amazon Web ServicesDjango Rest Framework