Creat API resource/method

Steps summary:

  1. Create a new resource called /ride within your API.
  2. Create a POST method for that resource and configure it to use a Lambda proxy integration backed by the RequestUnicorn function you created in the first step of this module.

Step-by-step directions:

Step 1: In the left navigation bar, click on Resources under your WildRydes API api

Step 2: From the Actions dropdown select Create Resource

Step 3: Enter ride as the Resource Name

Step 4: Ensure the Resource Path is set to ride

Step 5: Select Enable API Gateway CORS for the resource

Step 6: Click Create Resource api

Step 7: With the newly created /ride resources selected, from the Action dropdown, select Create Method

Step 8: Select POST from the new dropdown that appears, then click the checkmark api

Step 9: Select Lambda Function for the Integration Type

Step 10: Check the box for Use Lambda Proxy Integration

Step 11: Select the Region you are using for Lambda region

Step 12: Enter the name of the function you created in the previous module RequestUnicorn for Lambda function

Step 13: Choose Save api

Step 14: When prompted to give AWS API Gateway permission to invoke your function, choose OK api

Step 15: Choose on the Method Request card

Step 16: Choose the pencil icon next to Authorization api

Step 17: Select WildRydes Cognito user pool authorizer from the drop-down list, click the checkmark icon api