A developer is configuring security for a new REST API in Amazon API Gateway. The API must restrict access to only those clients who authenticate via an Amazon Cognito User Pool. Which of the following steps must the developer perform to implement this authorization? (Select TWO.)
- Create an Amazon Cognito User Pool authorizer in the API Gateway console.Cevap
- Configure the API methods to use the Cognito User Pool authorizer in the Method Request settings.Cevap
- CCreate a custom Lambda authorizer to manually decode and validate the JSON Web Tokens (JWTs) from the Cognito User Pool.
- DConfigure an Amazon Cognito Identity Pool to authenticate users and generate temporary AWS IAM credentials for API Gateway.
- EEnable Lambda proxy integration and implement JWT validation logic inside the backend AWS Lambda function.
Cevap
To configure authorization via a Cognito User Pool, the developer must create a Cognito User Pool authorizer in API Gateway and update the Method Request settings of the API methods to use this authorizer.
To authenticate API clients against an Amazon Cognito User Pool natively, the developer must first define a Cognito User Pool authorizer at the API Gateway level. Once the authorizer is defined, the developer must configure the specific REST API methods to use this authorizer under Method Request settings, ensuring that incoming requests are automatically validated.
Adım Adım Çözüm
Anahtar Kavram
Amazon API Gateway Cognito User Pool Authorizer