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.
In the left nav, click on Resources under your WildRydes API.
From the Actions dropdown select Create Resource.
Enter ride
as the Resource Name.
Ensure the Resource Path is set to ride
.
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.
Select 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 | © 2022 Amazon Web Services, Inc. or its Affiliates. All rights reserved.