Now that we know the API Gateway integration with the Lambda function works, we will deploy it and get the URL. The architecture is shown in the following diagram:
The workings of this architecture is as follows:
- Sign in to the AWS Management Console and open the API Gateway console at https://console.aws.amazon.com/apigateway/.
- In the Amazon API Gateway navigation pane, choose APIs and metrics.
- Select Resources under metrics and /Vists/{resourceId}, and choose Deploy API from the Actions drop-down menu.
- In the Deploy API pop-up window, perform the following steps:
- In Deployment stage, choose [New Stage]
- In Stage name, type prod
- In Stage description, type prod
- Select Deploy
- The Stages under metrics should be automatically selected on the left-hand menu.
- Select GET under prod/visits/{resourceId}/GET to get the invoke URL. The invoke...