To configure API Gateway for Lambda integration, complete the following steps. The Lambda function that you create lets you share the AppStream 2.0 image with the AWS account of the requester.
1. Open the Amazon API Gateway console at https://console.aws.amazon.com/apigateway.
2. In the navigation pane, under the examplecorp_si API, choose Resources.
3. Choose Actions, Create Resource.
4. Do the following:
• For Resource Name, type si.
• For Resource Path, verify that the value is /si.
• Select the Enable API Gateway CORS check box.
5. Choose Create Resource.
6. With your newly created resource (/si) 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.
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_si_function.
• Choose Save.
9. In the Add Permission to Lambda Function dialog box, choose OK.
10. In the Resources pane, choose your resource, si.
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.