Business Studies, asked by sahoodebasish09, 5 hours ago

You have created a Cognito user pool for your API named myLambda in the Amazon API Gateway console.

Answers

Answered by gsduapramahikvision
8
Try using words that might appear on the page that you’re looking for. For example, 'cake recipes' instead of 'how to make a cake'.
Answered by syed2020ashaels
3

Answer:

As per the data given in the above question.

There are two ways to set up an Amazon Cognito user pool as an authorizer on an API Gateway REST API:

  • There are two ways to set up an Amazon Cognito user pool as an authorizer on an API Gateway REST API:Create a COGNITO_USER_POOLS authorizer.
  • There are two ways to set up an Amazon Cognito user pool as an authorizer on an API Gateway REST API:Create a COGNITO_USER_POOLS authorizer.Create an AWS Lambda authorizer.

For authorization, you can use either ID tokens or access tokens. For more information, see Using tokens with user pools.

  • Resolution

The following procedure shows how to create a COGNITO_USER_POOLS authorizer. The example assumes you already created two things:

  • An Amazon Cognito user pool with an app client.
  • An API Gateway REST API resource.
  • Create a COGNITO_USER_POOLS authorizer
  • For more information, see Integrate a REST API with an Amazon Cognito user pool.

Test the new COGNITO_USER_POOLS authorizer

Test the new COGNITO_USER_POOLS authorizerAfter you create the COGNITO_USER_POOLS authorizer, do the following:

1. In the API Gateway console, choose the Test button under the new authorizer.

2. In the Test window, for Authorization, enter an ID token from the new Amazon Cognito user pool.

3. Choose Test.

Note: If the ID token is correct, the test returns a 200 response code. Incorrect ID tokens return a 401 response code.

#Configure the COGNITO_USER_POOLS authorizer on an API method

  • #NoteFor more information, see the To configure a COGNITO_USER_POOLS authorizer on methods section of Integrate a REST API with an Amazon
  • Cognito user pool.
  • Get authorization tokens

There are four ways to get authorization tokens:

  • The hosted web UI for Amazon Cognito
  • The AWS Command Line Interface (AWS CLI).
  • One of the AWS SDKs.
  • The Postman app.
Similar questions