What authorizer to use: Lambda Custom Authorizer or AWS Cognito?

0

I have a AWS Lambda (NET 6) working with RDS. What to use: Lambda Custom Authorizer or AWS Cognito? If I understand correctly: to use Lambda Custom Auhorizer need develop my own Lambda function. To use AWS Cognito I do not need to develop anything but only add users pool and maintain AWS Gateway?

Oleg
已提问 1 年前1702 查看次数
1 回答
0
已接受的回答

Hi Oleg,

Yes correct.

If you use Lambda authorizer, you will have to code the lambda handler yourself where you ll have to return an IAM policy to allow/deny the request. A dir net blueprint can be found here: https://github.com/awslabs/aws-apigateway-lambda-authorizer-blueprints/tree/master/blueprints/dotnet/src but you can use any supported languages for it.

With authorizers you are in full control.

For cognito you will have just to associate it to the api gw after you create an user pool. It provides certain features out of the box, but there are certain limitations (non able to add custom claims to access tokens, very rigid to update user pools after you create them). This will be driven by your requirements and risk appetite.

Hope it helps!

profile picture
专家
已回答 1 年前
profile picture
专家
已审核 14 天前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则