A developer is building a REST API using Amazon API Gateway and wants to restrict access to authenticated users from a specific Amazon Cognito User Pool. The developer wants to use the built-in integration features of API Gateway without writing custom code for authentication validation. Which two actions must the developer perform to configure a Cognito User Pools authorizer for the API? (Select two.)
- Create a Cognito User Pool authorizer in API Gateway and configure it with the Cognito User Pool details.Cevap
- Configure the API Gateway resource method to use the newly created Cognito User Pool authorizer.Cevap
- CCreate a Cognito Identity Pool authorizer in API Gateway and configure it with the Identity Pool ID.
- DCreate a custom Lambda authorizer that manually decodes and verifies the Cognito User Pool identity tokens.
- EConfigure a Lambda integration in proxy mode so that the backend function handles Cognito client verification.
Cevap
To configure a Cognito User Pools authorizer, the developer must create the Cognito User Pool authorizer in API Gateway and then configure the API method to use that authorizer.
To secure the API using Cognito User Pools natively, the developer needs to create a Cognito User Pool authorizer in API Gateway and then assign that authorizer to the respective resource methods. This offloads authentication from backend integrations to API Gateway.
Adım Adım Çözüm
Anahtar Kavram
API Gateway Cognito User Pools Authorizer
Tahmini Süre:1m 0s