How to set default Lambda Authorizer for API Gateway

0

API Gateway has multiple Lambda Authorizer. I want to set Lambda Authorizer for all Resources(Methods) For that I need to configure Lambda Authorizer for all methods. Is there any configuration which we can do at the global level and applied for all the methods in the API Gateway. This is very helpful when I have 1000s of methods in API Gateway.

1 Antwort
1

How are you creating the API Gateway? If you use Serverless Application Model you can define the default parameters for each method (including authentication). At deployment time, it's done for you. There are other defaults too such as the Lambda function language - many more...

From the documentation check out Api (for REST APIs) and HttpApi (for HTTP APIs). Both have an Auth section that lets you specify the default Lambda Authorizer but it can be overriden on a method-by-method basis.

profile pictureAWS
EXPERTE
beantwortet vor 3 Monaten
profile pictureAWS
EXPERTE
überprüft vor 3 Monaten
  • Thanks @Brettski-AWS and @Didier_Durand

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen