Create a new resource called /ride within your API. Then 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
rideas the Resource Name.
Click Create Resource.
With the newly created
/ride resource selected, from the Action dropdown select Create Method.
POST from the new dropdown that appears, then click the checkmark.
Select Lambda Function for the integration type.
Check the box for Use Lambda Proxy integration.
Select the Region you are using for Lambda Region.
Enter the name of the function you created in the previous module,
RequestUnicorn, for Lambda Function.
Choose Save. Please note, if you get an error that you function does not exist, check that the region you selected matches the one you used in the previous module.
When prompted to give Amazon API Gateway permission to invoke your function, choose OK.
Choose on the Method Request card.
Choose the pencil icon next to Authorization.
Select the WildRydes Cognito user pool authorizer from the drop-down list, and click the checkmark icon.