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
In the left nav, click on Resources under your WildRydes API.
From the Actions dropdown select Create Resource.
ride as the Resource Name.
Ensure the Resource Path is set to
Select Enable API Gateway CORS for the resource.
Choose 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.
Select 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.
Privacy | Site Terms | Cookie Preferences | © Copyright 2020 Amazon.com, Inc. or its affiliates. All rights reserved.