To configure API Gateway for Lambda integration, complete the following steps. The Lambda function that you create generates a streaming URL when requested.
1. Open the Amazon API Gateway console at https://console.thinkwithwp.com/apigateway.
2. In the navigation pane, under the examplecorp_tin API, choose Resources.
3. Choose Actions, Create Resource.
4. Do the following:
• For Resource Name, type tin.
• For Resource Path, verify that the value is /tin.
• Select the Enable API Gateway CORS check box.
5. Choose Create Resource.
6. With your newly created resource (/tin) selected in the Resources pane, choose Actions, Create Method.
7. Under OPTIONS, choose POST, and select the check mark to the right of the list to save your changes.
8. In the POST Setup pane, do the following:
• For Integration type, keep Lambda Function selected.
• Select the Use Lambda Proxy integration check box.
• For Lambda Region, verify that the Region where you created your Lambda function is selected.
• For Lambda Function, type the name of the function that you created earlier in this project: examplecorp_lambda_tin_function.
• Choose Save.
9. In the Add Permission to Lambda Function dialog box, choose OK to confirm your changes.
10. In the Resources pane, choose your resource, tin.
11. Choose Actions, Deploy API.
12. In the Deploy API dialog box, do the following:
• For Deployment stage, choose [New Stage].
• For Stage name, type dev
• For Stage description and Deployment description, you can optionally type a description.
• Choose Deploy.
13. At the top of the Stage Editor pane, the Invoke URL displays. Make a note of this URL. This URL is required later in the project.