Creat Cognito-based Authorizer

AWS API Gateway can use the JWT tokens returned by Cognito User Pools to authenticate API calls.

In this step, you will configure an authorizer for your API to use the user pool you created in User Management.

Steps summary:

  1. In the AWS API Gateway console, create a new Cognito user pool authorizer for your API.
  2. Configure it with the details of the user pool that you created in the previous module.
  3. You can test the configuration in the console by copying and pasting the auth token presented to you after you log in via the /signin.html page of your current website

Step-by-step directions:

Step 1: Under your newly created API, choose Authorizers api

Step 2: Choose Create New Authorizer api

Step 3: Enter WildRydes for the Authorizer name

Step 4: Select Cognito for the type

Step 5: In the Region drop-down under Cognito User Pool, select the Region where you created your Cognito user pool in the User Management module

Note: By default the current region should be selected

Step 6: Enter WildRydes in the Cognito User Pool input

Step 7: Enter Authorization for the Token Source api

Step 8: Choose Create