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?

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年前

ログインしていません。 ログイン 回答を投稿する。

優れた回答とは、質問に明確に答え、建設的なフィードバックを提供し、質問者の専門分野におけるスキルの向上を促すものです。

質問に答えるためのガイドライン

関連するコンテンツ