Y
Y
Yura Khlyan2019-12-10 17:48:28
Amazon Web Services
Yura Khlyan, 2019-12-10 17:48:28

Django (RestFramework) + AWS Cognito?

How can I make DRF and ASW Cognito friends?
I plan to do a project on serverless (AWS lambda) DRF + Vue. I looked that AWS has Cognito, I wanted to screw it on. But I have a few questions already in my head.
- Front login does via DRF? Or does he go to Cognito himself, and then transfer the token to DRF? Which option and which is better?
- Are there good packages for DRF (Django) or is it better to use it boto3and do it through the client?
- If I want to do two-factor authentication, but don't want to use ASW SNS for SMS delivery, can I add Twillio to Cognito?
Well, a general question on Django ASW lamdba. I plan to do through zappa. Does such an approach even have the right to life? Will there be many problems? And I understood thatzappaall in one lambda, and API Gateway proxies everything to the django app, then if you go to a non-existent url, API Gateway will skip the request to the app, and the app will return 404, but the lambda will start, and will eat money. If so, how to deal with it?
Somehow I got a lot of questions, well, maybe I'll learn something new.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Shumov, 2019-12-10
@inoise

Lots of letters!
According to Serverless:
- no Django, because request immediately arrives in lambda, and routing is done on api gateway. consider this functional programming
- look at the Serverless Framework
- boto3 is a cool thing, but do not forget that this is just a wrapper for services
- zappa is in the trash, it doesn’t really know anything, but it deploys everything uncontrollably to your account
- there will be problems if you need a low latency because lambda has a cold start (can be reduced through a new feature )
- 404 in API Gateway is done as ANY /{proxy+} -> lambda
By Cognito:
- discard. If you are not willing to spend days and weeks to get at least something
- look at Auth0

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question